# Rails

**URL:** https://www.ruby-forum.com/c/ruby-on-rails/6.md?page=1641

[Latest](https://www.ruby-forum.com/latest.md) · [Categories](https://www.ruby-forum.com/categories.md) · [Tags](https://www.ruby-forum.com/tags.md)

**Page:** 1642

---

## [Polymorphic Associations - Customer & Supplier have Phones](https://www.ruby-forum.com/t/polymorphic-associations-customer-supplier-have-phones/225977)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 0\
**Last updated:** [November 2, 2007, 12:38pm UTC](https://www.ruby-forum.com/t/polymorphic-associations-customer-supplier-have-phones/225977 "2007-11-02T12:38:13Z")

</div>

INTRO I am currently working for a company who want a new e-commerce interface; I have considered using ruby on rails. I am completely stuck I donâ€™t know what has gone wrong I am trying to create customers or suppl…

---

## [Triggering an AJAX request](https://www.ruby-forum.com/t/triggering-an-ajax-request/119036)

<div class="topic-metadata">

**Author:** [@splattael](https://www.ruby-forum.com/u/splattael)\
**Replies:** 0\
**Last updated:** [November 2, 2007, 12:31pm UTC](https://www.ruby-forum.com/t/triggering-an-ajax-request/119036 "2007-11-02T12:31:31Z")

</div>

Hello, I am sure this situation is quite common and nothing complicated to solve, but I’d like to know the Rails way of doing it: Screen 1) I have a search form. After clicking ‘search’, the results are displayed wi…

---

## [Usin JRuby within a Rails project](https://www.ruby-forum.com/t/usin-jruby-within-a-rails-project/119033)

<div class="topic-metadata">

**Author:** [@nicksnels](https://www.ruby-forum.com/u/nicksnels)\
**Replies:** 0\
**Last updated:** [November 2, 2007, 12:05pm UTC](https://www.ruby-forum.com/t/usin-jruby-within-a-rails-project/119033 "2007-11-02T12:05:22Z")

</div>

Hi, I’m using JRuby to talk to iText a Java library. I have got it working in a small Ruby project. Now I would like to integrate this in an existing Ruby on Rails project. So I have added the code from my Ruby file …

---

## [Best Rails VPS](https://www.ruby-forum.com/t/best-rails-vps/118859)

<div class="topic-metadata">

**Author:** [@Matthew\_Swasey](https://www.ruby-forum.com/u/Matthew_Swasey)\
**Replies:** 14\
**Last updated:** [November 2, 2007, 12:04pm UTC](https://www.ruby-forum.com/t/best-rails-vps/118859 "2007-11-02T12:04:00Z")

</div>

Ok, so I’d love to get a slicehost account, and set all my rails stuff up there. However, the sad (and annoying) reality is that you can’t get slices right now, and I’ve been on the waiting list for weeks and weeks, …

---

## [Constant Synthesis not found , rake Aborted!](https://www.ruby-forum.com/t/constant-synthesis-not-found-rake-aborted/119029)

<div class="topic-metadata">

**Author:** [@shyl\_ruby](https://www.ruby-forum.com/u/shyl_ruby)\
**Replies:** 0\
**Last updated:** [November 2, 2007, 10:56am UTC](https://www.ruby-forum.com/t/constant-synthesis-not-found-rake-aborted/119029 "2007-11-02T10:56:43Z")

</div>

I was trying to execute rake:migrarte . I am getting an error related to Synthesis, Given below is the out put. E:…\\trunk\>rake db:migrate (in E:/…/trunk) rake aborted! Constant Rails::Synthesis from rails/synthesis…

---

## [Customized form](https://www.ruby-forum.com/t/customized-form/119027)

<div class="topic-metadata">

**Author:** [@jojobert](https://www.ruby-forum.com/u/jojobert)\
**Replies:** 0\
**Last updated:** [November 2, 2007, 10:22am UTC](https://www.ruby-forum.com/t/customized-form/119027 "2007-11-02T10:22:32Z")

</div>

I have created a table containing all the fields which I wanted. In other words, I customized my own form. But, I do not want the form to be auto-generated. How do I put my customized form in the new.rhtml? Course…

---

## [Freeze an app to earlier rails version](https://www.ruby-forum.com/t/freeze-an-app-to-earlier-rails-version/118958)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 2\
**Last updated:** [November 2, 2007, 10:10am UTC](https://www.ruby-forum.com/t/freeze-an-app-to-earlier-rails-version/118958 "2007-11-02T10:10:08Z")

</div>

I have rails 1.2.3 and 1.2.5 installed, and i’m using 1.2.5 as standard. I’m having some restful issues. I want to make a new app, frozen to 1.2.3, so i can see if the problems occur there as well. Can anyone tell m…

---

## [Restore session from session\_id](https://www.ruby-forum.com/t/restore-session-from-session-id/118925)

<div class="topic-metadata">

**Author:** [@starburger](https://www.ruby-forum.com/u/starburger)\
**Replies:** 4\
**Last updated:** [November 2, 2007, 10:03am UTC](https://www.ruby-forum.com/t/restore-session-from-session-id/118925 "2007-11-02T10:03:01Z")

</div>

Hi all, is it possible to get/restore a session by the session\_id in a controller action? I’m using a flash component (MultiPowUpload) which unfortunately doesn’t pass cookies when calling an action. Therefore I have…

---

## [Error when starting web server from environment.rb](https://www.ruby-forum.com/t/error-when-starting-web-server-from-environment-rb/119026)

<div class="topic-metadata">

**Author:** [@ram](https://www.ruby-forum.com/u/ram)\
**Replies:** 0\
**Last updated:** [November 2, 2007, 10:00am UTC](https://www.ruby-forum.com/t/error-when-starting-web-server-from-environment-rb/119026 "2007-11-02T10:00:36Z")

</div>

Hi, I downloaded the rails package “rails-1.2.5.zip” from “http:// rubyforge.org/frs/?group\_id=307” and unzipped in to c drive. When I ran ruby script/server, it throws an error “c:/ruby/lib/ruby/site\_ruby/ 1.8/rubyg…

---

## [Auto complete plugin and CSRF protection-- do you care?](https://www.ruby-forum.com/t/auto-complete-plugin-and-csrf-protection-do-you-care/118092)

<div class="topic-metadata">

**Author:** [@kpd](https://www.ruby-forum.com/u/kpd)\
**Replies:** 6\
**Last updated:** [November 2, 2007, 8:25am UTC](https://www.ruby-forum.com/t/auto-complete-plugin-and-csrf-protection-do-you-care/118092 "2007-11-02T08:25:51Z")

</div>

Hi, I just noticed that the auto\_complete plugin does not work with the CSRF protection in Rails 2.0. I’ve patched the plugin, but I’m wondering if people would like to see the official plugin fixed. If so, speak up …

---

## [Newbie's guide to deploying Rails app](https://www.ruby-forum.com/t/newbies-guide-to-deploying-rails-app/119021)

<div class="topic-metadata">

**Author:** [@Dany\_Wu](https://www.ruby-forum.com/u/Dany_Wu)\
**Replies:** 0\
**Last updated:** [November 2, 2007, 7:58am UTC](https://www.ruby-forum.com/t/newbies-guide-to-deploying-rails-app/119021 "2007-11-02T07:58:23Z")

</div>

Hi everyone, I’m a newbie when it comes to Apache, Ruby, Rails, and…well…Linux in general. At the moment I am running OpenSUSE 10.3. I have written a simple app and would like to deploy it to the OpenSUSE box. There s…

---

## [Capistrano retaining deployment subversion account](https://www.ruby-forum.com/t/capistrano-retaining-deployment-subversion-account/119019)

<div class="topic-metadata">

**Author:** [@robby247365](https://www.ruby-forum.com/u/robby247365)\
**Replies:** 0\
**Last updated:** [November 2, 2007, 7:36am UTC](https://www.ruby-forum.com/t/capistrano-retaining-deployment-subversion-account/119019 "2007-11-02T07:36:11Z")

</div>

Hey all, I’m having an issue where I’m deploying with a subversion username that doesn’t match my local username and it ends up being retained. For example, let’s say that I have two accounts… robby and deployer. I’v…

---

## [Sorting has\_many - via parent association](https://www.ruby-forum.com/t/sorting-has-many-via-parent-association/118907)

<div class="topic-metadata">

**Author:** [@mgiorno](https://www.ruby-forum.com/u/mgiorno)\
**Replies:** 2\
**Last updated:** [November 2, 2007, 7:08am UTC](https://www.ruby-forum.com/t/sorting-has-many-via-parent-association/118907 "2007-11-02T07:08:35Z")

</div>

Hey, I’m trying to sort an array result through a has many relationship, but am getting a little stuck. My bands model has\_many videos. I am trying to sort a list of videos by band.name and then video.name. I’ve see…

---

## [Capistrano Runtime Error](https://www.ruby-forum.com/t/capistrano-runtime-error/119014)

<div class="topic-metadata">

**Author:** [@suja](https://www.ruby-forum.com/u/suja)\
**Replies:** 2\
**Last updated:** [November 2, 2007, 6:33am UTC](https://www.ruby-forum.com/t/capistrano-runtime-error/119014 "2007-11-02T06:33:49Z")

</div>

Hi, I’m trying to use capistrano(capistrano-2.1.0) deployment on my application. Here is deploy.rb set :application, “cook” set :repository, “svn+ssh://192.168.0.204/home/suja/mysvn” If you aren’t deploying to /u…

---

## [Extending ActiveRecord for csv export... a better way?](https://www.ruby-forum.com/t/extending-activerecord-for-csv-export-a-better-way/118835)

<div class="topic-metadata">

**Author:** [@adambeazley](https://www.ruby-forum.com/u/adambeazley)\
**Replies:** 5\
**Last updated:** [November 2, 2007, 5:28am UTC](https://www.ruby-forum.com/t/extending-activerecord-for-csv-export-a-better-way/118835 "2007-11-02T05:28:17Z")

</div>

As a new Ruby user (JRuby, actually), I’ve picked up this language with a very specific purpose: to export data from a JDBC database into flat files. I’ve figured out how to get the data out of the DB and into a file…

---

## [How know record was found?](https://www.ruby-forum.com/t/how-know-record-was-found/119000)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 6\
**Last updated:** [November 2, 2007, 5:23am UTC](https://www.ruby-forum.com/t/how-know-record-was-found/119000 "2007-11-02T05:23:02Z")

</div>

OK, for the life of me I can’t see anywhere how I am supposed to figure out if a record was actually found. class Shape \< ActiveRecord::Base def self.findSquare find(:first, conditions: whetever.......) # …

---

## [Problems during install of mongrel](https://www.ruby-forum.com/t/problems-during-install-of-mongrel/119012)

<div class="topic-metadata">

**Author:** [@swaroop](https://www.ruby-forum.com/u/swaroop)\
**Replies:** 0\
**Last updated:** [November 2, 2007, 5:02am UTC](https://www.ruby-forum.com/t/problems-during-install-of-mongrel/119012 "2007-11-02T05:02:01Z")

</div>

I’m trying to install mongrel-1.1 (the hot-off-the-press version). I have ruby v1.8.6 and it’s running on a Redhat Linux ES server. Specifically, I’m facing a problem wherein I get these "No definition for " messages …

---

## [Photo selling application](https://www.ruby-forum.com/t/photo-selling-application/118974)

<div class="topic-metadata">

**Author:** [@nelson](https://www.ruby-forum.com/u/nelson)\
**Replies:** 2\
**Last updated:** [November 2, 2007, 4:49am UTC](https://www.ruby-forum.com/t/photo-selling-application/118974 "2007-11-02T04:49:10Z")

</div>

Hi all, i’m doing my first ruby on rails work. I have to build a photo selling site. A photographer login, upload his photos and sells it. the photo will be protected in some particular way (i will use tags for this…

---

## [How extend model attributes?](https://www.ruby-forum.com/t/how-extend-model-attributes/118993)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 2\
**Last updated:** [November 2, 2007, 4:40am UTC](https://www.ruby-forum.com/t/how-extend-model-attributes/118993 "2007-11-02T04:40:24Z")

</div>

How do I add arbitrary attributes to an AR model? It would appear that simply adding instance vars with accessors to an AR model doesn’t actually work the same way as a regular class. Quite confused by that. The attr…

---

## [Implementing countries and states drop down](https://www.ruby-forum.com/t/implementing-countries-and-states-drop-down/118295)

<div class="topic-metadata">

**Author:** [@ruchita](https://www.ruby-forum.com/u/ruchita)\
**Replies:** 70\
**Last updated:** [November 2, 2007, 3:47am UTC](https://www.ruby-forum.com/t/implementing-countries-and-states-drop-down/118295 "2007-11-02T03:47:57Z")

</div>

Hi all, I am implementing the functionality of cascading drop downs of countries and states. I want this to be done with Ajax and ruby so that the page dont get refreshed on selecting the country in first drop down. C…

---

## [Default value for collection\_select](https://www.ruby-forum.com/t/default-value-for-collection-select/118911)

<div class="topic-metadata">

**Author:** [@ruchita](https://www.ruby-forum.com/u/ruchita)\
**Replies:** 1\
**Last updated:** [November 2, 2007, 3:35am UTC](https://www.ruby-forum.com/t/default-value-for-collection-select/118911 "2007-11-02T03:35:41Z")

</div>

Hi all, Can we use collection\_select with default selected option. I am implementing countries and its corresponding states dropdown through Ajax and I have used collection\_select method to select countries. Now for …

---

## [Sports Match Model](https://www.ruby-forum.com/t/sports-match-model/119003)

<div class="topic-metadata">

**Author:** [@Pootsy](https://www.ruby-forum.com/u/Pootsy)\
**Replies:** 1\
**Last updated:** [November 2, 2007, 2:35am UTC](https://www.ruby-forum.com/t/sports-match-model/119003 "2007-11-02T02:35:21Z")

</div>

Hi, I’m looking to model a set of fixtures for a sports league. I’ve got a team model {id\*, name} And a match model {id\*, date, homeTeam, homeScore, awayTeam, awayScore} I’d like the team.id to appear in the match.h…

---

## [Session data in observer](https://www.ruby-forum.com/t/session-data-in-observer/118890)

<div class="topic-metadata">

**Author:** [@da991319](https://www.ruby-forum.com/u/da991319)\
**Replies:** 2\
**Last updated:** [November 2, 2007, 2:30am UTC](https://www.ruby-forum.com/t/session-data-in-observer/118890 "2007-11-02T02:30:40Z")

</div>

Hello, In my app, there is an observer that gets fired when an change is done on one table. what i want it to do is to write into an other table the action done and the user which made the action. But until now i did…

---

## [Public directory not updating](https://www.ruby-forum.com/t/public-directory-not-updating/119008)

<div class="topic-metadata">

**Author:** [@patnakajima](https://www.ruby-forum.com/u/patnakajima)\
**Replies:** 0\
**Last updated:** [November 2, 2007, 2:26am UTC](https://www.ruby-forum.com/t/public-directory-not-updating/119008 "2007-11-02T02:26:35Z")

</div>

This might be better suited for the Capistrano list, but I thought it might have something to do with Rails 2.0’s asset caching. My trouble is that my app’s style looks and works perfectly fine when I’m running it loc…

---

## [Leopard - Newbie to ROR, help please](https://www.ruby-forum.com/t/leopard-newbie-to-ror-help-please/118809)

<div class="topic-metadata">

**Author:** [@Gareth](https://www.ruby-forum.com/u/Gareth)\
**Replies:** 6\
**Last updated:** [November 2, 2007, 1:56am UTC](https://www.ruby-forum.com/t/leopard-newbie-to-ror-help-please/118809 "2007-11-02T01:56:10Z")

</div>

Hi guys and gals, I’ve upgraded to leopard (clean install) and was under the impression that as ROR comes built into leopard I’d have no problems getting set up. I’ve updated it using: gem update rails That went fi…

---

## [Adding custom callbacks to auto\_complete\_field?](https://www.ruby-forum.com/t/adding-custom-callbacks-to-auto-complete-field/118999)

<div class="topic-metadata">

**Author:** [@medic0747](https://www.ruby-forum.com/u/medic0747)\
**Replies:** 0\
**Last updated:** [November 2, 2007, 1:33am UTC](https://www.ruby-forum.com/t/adding-custom-callbacks-to-auto-complete-field/118999 "2007-11-02T01:33:36Z")

</div>

Hi guys, I was wondering if I can add a custom callback to ‘auto\_complete\_field’ helper. I know there are several options (:on\_show, :on\_hide, :after\_update, and so on) already, but I want to add another callback, wh…

---

## [Rflickr search tool display total returned photos](https://www.ruby-forum.com/t/rflickr-search-tool-display-total-returned-photos/118901)

<div class="topic-metadata">

**Author:** [@rocketgofaster](https://www.ruby-forum.com/u/rocketgofaster)\
**Replies:** 2\
**Last updated:** [November 2, 2007, 1:15am UTC](https://www.ruby-forum.com/t/rflickr-search-tool-display-total-returned-photos/118901 "2007-11-02T01:15:30Z")

</div>

I’m attempting to display the total images returned in a search using the rflickr plugin. Let me know if i should provide more info, i think i’ve included the relevant code. I’m a total newbie and could use a hand. T…

---

## [DATE\_FORMATS and functional tests](https://www.ruby-forum.com/t/date-formats-and-functional-tests/118995)

<div class="topic-metadata">

**Author:** [@sp00nyg](https://www.ruby-forum.com/u/sp00nyg)\
**Replies:** 0\
**Last updated:** [November 2, 2007, 1:00am UTC](https://www.ruby-forum.com/t/date-formats-and-functional-tests/118995 "2007-11-02T01:00:41Z")

</div>

I have the following in my environments.rb file: my\_formats = { :msc =\> ‘%d %b %Y %I:%M %p’, :msc\_short =\> ‘%d %b %Y’ } ActiveSupport::CoreExtensions::Time::Conversions::DATE\_FORMATS.merge! (my\_formats) ActiveSupport…

---

## [Action in a action from an other controller](https://www.ruby-forum.com/t/action-in-a-action-from-an-other-controller/118961)

<div class="topic-metadata">

**Author:** [@heldopslippers](https://www.ruby-forum.com/u/heldopslippers)\
**Replies:** 7\
**Last updated:** [November 2, 2007, 12:43am UTC](https://www.ruby-forum.com/t/action-in-a-action-from-an-other-controller/118961 "2007-11-02T00:43:26Z")

</div>

he… I have an action and in this action I want to call an other action for example list in controller article… I now how to do this if the action you want to call is in the same controller: def index list end but…

---

## [Render partial](https://www.ruby-forum.com/t/render-partial/118692)

<div class="topic-metadata">

**Author:** [@jimmygoogle](https://www.ruby-forum.com/u/jimmygoogle)\
**Replies:** 2\
**Last updated:** [November 2, 2007, 12:33am UTC](https://www.ruby-forum.com/t/render-partial/118692 "2007-11-02T00:33:49Z")

</div>

I have a quick question about render partial functionality. I have an array of items and I am printing out the item and its link - I would like the link when clicked to display the content below it. I have this work…

[Previous page](https://www.ruby-forum.com/c/ruby-on-rails/6.md?page=1640)

[Next page](https://www.ruby-forum.com/c/ruby-on-rails/6.md?page=1642)
