# Rails

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

[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:** 1007

---

## [Wrong number of arguments (3 for 2)](https://www.ruby-forum.com/t/wrong-number-of-arguments-3-for-2/161939)

<div class="topic-metadata">

**Author:** [@zqj](https://www.ruby-forum.com/u/zqj)\
**Replies:** 2\
**Last updated:** [March 4, 2009, 2:00pm UTC](https://www.ruby-forum.com/t/wrong-number-of-arguments-3-for-2/161939 "2009-03-04T14:00:27Z")

</div>

Showing vendor/plugins/community\_engine/app/views/users/new.html.haml where line #40 raised: wrong number of arguments (3 for 2) Extracted source (around line #40): 37: %label{“for”=\>“birthdate”} 38: …

---

## [Before\_filter - How to?](https://www.ruby-forum.com/t/before-filter-how-to/161976)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [March 4, 2009, 1:58pm UTC](https://www.ruby-forum.com/t/before-filter-how-to/161976 "2009-03-04T13:58:42Z")

</div>

Hi, i have functions for which i use before\_filter before\_filter :find\_customer, :except =\> \[:index, :new, :create\] Do i need to use another before\_filter for another set of functions like before\_filter :countries\_list…

---

## [Img & link inline?](https://www.ruby-forum.com/t/img-link-inline/161942)

<div class="topic-metadata">

**Author:** [@loader](https://www.ruby-forum.com/u/loader)\
**Replies:** 1\
**Last updated:** [March 4, 2009, 1:33pm UTC](https://www.ruby-forum.com/t/img-link-inline/161942 "2009-03-04T13:33:30Z")

</div>

Hello everyone! I Have a small image (icone) followed by an icone. Here is my code : \<%= image\_tag “/error.png” if (…) -%\>\<%= link\_to post.id, post\_path(post) %\> My question is : how can I have this two things inline…

---

## [How to get session values in rails 2.3](https://www.ruby-forum.com/t/how-to-get-session-values-in-rails-2-3/161969)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 2\
**Last updated:** [March 4, 2009, 12:34pm UTC](https://www.ruby-forum.com/t/how-to-get-session-values-in-rails-2-3/161969 "2009-03-04T12:34:07Z")

</div>

in rails 2.3.0 DEPRECATION WARNING: Disabling sessions for a single controller has been deprecated. Sessions are now lazy loaded. So if you don’t access them, consider them off. You can still modify the session cookie…

---

## [Which are the right :joins for two models in which one has two belongs\_to the other same model?](https://www.ruby-forum.com/t/which-are-the-right-joins-for-two-models-in-which-one-has-two-belongs-to-the-other-same-model/161974)

<div class="topic-metadata">

**Author:** [@gabriele](https://www.ruby-forum.com/u/gabriele)\
**Replies:** 0\
**Last updated:** [March 4, 2009, 12:27pm UTC](https://www.ruby-forum.com/t/which-are-the-right-joins-for-two-models-in-which-one-has-two-belongs-to-the-other-same-model/161974 "2009-03-04T12:27:48Z")

</div>

Hi all, here is the main picture (obviously some snips are made): class JobFile \< ActiveRecord::Base belongs\_to :car belongs\_to :counterpart\_insurance, :class\_name =\> ‘Insurance’, :foreign\_key =\> ‘counterpart\_insura…

---

## [Find\_by\_sql](https://www.ruby-forum.com/t/find-by-sql/161973)

<div class="topic-metadata">

**Author:** [@chaitanya](https://www.ruby-forum.com/u/chaitanya)\
**Replies:** 1\
**Last updated:** [March 4, 2009, 12:21pm UTC](https://www.ruby-forum.com/t/find-by-sql/161973 "2009-03-04T12:21:21Z")

</div>

hello guys is there any method for retriving table values without a concerned model for that table.

---

## [Acts\_as\_taggable\_on\_steroids form](https://www.ruby-forum.com/t/acts-as-taggable-on-steroids-form/161971)

<div class="topic-metadata">

**Author:** [@katsuo](https://www.ruby-forum.com/u/katsuo)\
**Replies:** 0\
**Last updated:** [March 4, 2009, 12:03pm UTC](https://www.ruby-forum.com/t/acts-as-taggable-on-steroids-form/161971 "2009-03-04T12:03:40Z")

</div>

Hi, i need help with a way to add tags to titles. i can not enter any values to tags and tagging tables this way. title\_new.rhtml \<% form\_tag :action=\>‘title\_create’ do %\> Name:\<%= text\_field 'title', 'name' %\> Tag…

---

## [Insert rails into php](https://www.ruby-forum.com/t/insert-rails-into-php/160057)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 7\
**Last updated:** [March 4, 2009, 11:37am UTC](https://www.ruby-forum.com/t/insert-rails-into-php/160057 "2009-03-04T11:37:40Z")

</div>

hi experts, i have a PHP web application which consists of so much modules (like registration,billing,reports,etc…) i want to convert arround only 60% modules from PHP to Rails, that means remaining 40% modules shoul…

---

## [How to use Controller instance methods inside (Web Service) API Services](https://www.ruby-forum.com/t/how-to-use-controller-instance-methods-inside-web-service-api-services/161970)

<div class="topic-metadata">

**Author:** [@Piyush\_with\_Rails](https://www.ruby-forum.com/u/Piyush_with_Rails)\
**Replies:** 0\
**Last updated:** [March 4, 2009, 11:15am UTC](https://www.ruby-forum.com/t/how-to-use-controller-instance-methods-inside-web-service-api-services/161970 "2009-03-04T11:15:23Z")

</div>

Hi All, I am using AWS to implement web service APIs in rails and i am using Layered dispatching mode for implementation. Here i am not getting how can i use controller’s instance methods (both user defined and built…

---

## [Rails 2 blog screencast, ajax error](https://www.ruby-forum.com/t/rails-2-blog-screencast-ajax-error/161966)

<div class="topic-metadata">

**Author:** [@mdq](https://www.ruby-forum.com/u/mdq)\
**Replies:** 0\
**Last updated:** [March 4, 2009, 11:07am UTC](https://www.ruby-forum.com/t/rails-2-blog-screencast-ajax-error/161966 "2009-03-04T11:07:05Z")

</div>

I’ve been following the '15 minute blog ’ screencast on the rails site. Got to the part when you add ajax functionality to the comments form and when i try to post a new comment this way in Firefox, i get an alert win…

---

## [How to mix php and ruby / rails](https://www.ruby-forum.com/t/how-to-mix-php-and-ruby-rails/161967)

<div class="topic-metadata">

**Author:** [@ravigit](https://www.ruby-forum.com/u/ravigit)\
**Replies:** 0\
**Last updated:** [March 4, 2009, 11:07am UTC](https://www.ruby-forum.com/t/how-to-mix-php-and-ruby-rails/161967 "2009-03-04T11:07:05Z")

</div>

I have a php web application. I also have a ruby / rails application. I want to have the ruby / rails app generate it’s output within a section in the php web application. Is this possible? Normally, you can have a fu…

---

## [Updating DIV within Form](https://www.ruby-forum.com/t/updating-div-within-form/161968)

<div class="topic-metadata">

**Author:** [@someguy](https://www.ruby-forum.com/u/someguy)\
**Replies:** 0\
**Last updated:** [March 4, 2009, 11:07am UTC](https://www.ruby-forum.com/t/updating-div-within-form/161968 "2009-03-04T11:07:03Z")

</div>

I have DIV in my form that I successfully populate, however when I submit the form that now contains the new fields within the DIV, the fields in the DIV do not get sent in my request. I have the prototype javascript…

---

## [Creating list of values LOV](https://www.ruby-forum.com/t/creating-list-of-values-lov/196908)

<div class="topic-metadata">

**Author:** [@preethi](https://www.ruby-forum.com/u/preethi)\
**Replies:** 0\
**Last updated:** [March 4, 2009, 10:52am UTC](https://www.ruby-forum.com/t/creating-list-of-values-lov/196908 "2009-03-04T10:52:20Z")

</div>

Hi, I want to select some users from ‘n’ number of user, where, right now I’m using textboxes which take search criteria and populating a list box. I want to replace the whole thing with an LOV(list of values) featur…

---

## [Params and empty strings](https://www.ruby-forum.com/t/params-and-empty-strings/161960)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 1\
**Last updated:** [March 4, 2009, 9:29am UTC](https://www.ruby-forum.com/t/params-and-empty-strings/161960 "2009-03-04T09:29:31Z")

</div>

Is there some better way to do this? http://assertbuggy.blogspot.com/2007/06/ruby-on-rails-params-and-empty-strings.html

---

## [How to create LOV list of values](https://www.ruby-forum.com/t/how-to-create-lov-list-of-values/161959)

<div class="topic-metadata">

**Author:** [@preethi](https://www.ruby-forum.com/u/preethi)\
**Replies:** 0\
**Last updated:** [March 4, 2009, 9:16am UTC](https://www.ruby-forum.com/t/how-to-create-lov-list-of-values/161959 "2009-03-04T09:16:11Z")

</div>

Hi, I want to select some users from ‘n’ number of user, where, right now I’m using textboxes which take search criteria and populating a list box. I want to replace the whole thing with an LOV(list of values) featur…

---

## [Lightbox issue](https://www.ruby-forum.com/t/lightbox-issue/161950)

<div class="topic-metadata">

**Author:** [@radha](https://www.ruby-forum.com/u/radha)\
**Replies:** 0\
**Last updated:** [March 4, 2009, 5:55am UTC](https://www.ruby-forum.com/t/lightbox-issue/161950 "2009-03-04T05:55:00Z")

</div>

Hello friends, I m using lightbox in my rails application. After clicking on a link, lightbox opens but my problem is when user goes on pressing enter without clicking on a lightbox window, multiple lighboxs open. H…

---

## [Executing a ruby file](https://www.ruby-forum.com/t/executing-a-ruby-file/161798)

<div class="topic-metadata">

**Author:** [@sudhi](https://www.ruby-forum.com/u/sudhi)\
**Replies:** 8\
**Last updated:** [March 4, 2009, 4:26am UTC](https://www.ruby-forum.com/t/executing-a-ruby-file/161798 "2009-03-04T04:26:44Z")

</div>

Hi, I am a newbie to ruby and want to execute a ruby file that is provided as input. I want to be able to redirect the output of the execution to a log file as well. I am basically looking at executing a test.rb file…

---

## [Split textarea content into array](https://www.ruby-forum.com/t/split-textarea-content-into-array/161897)

<div class="topic-metadata">

**Author:** [@sudhi](https://www.ruby-forum.com/u/sudhi)\
**Replies:** 2\
**Last updated:** [March 4, 2009, 4:04am UTC](https://www.ruby-forum.com/t/split-textarea-content-into-array/161897 "2009-03-04T04:04:44Z")

</div>

Hi, I am a newbie to rails and have a problem to solve. I have textarea which provides as input Line1 Line2 Line3 I want this content to be split into an array using “\\r\\n” as the seperators. I tried to do the sp…

---

## [Using "join" on associated objects](https://www.ruby-forum.com/t/using-join-on-associated-objects/161921)

<div class="topic-metadata">

**Author:** [@partydrone](https://www.ruby-forum.com/u/partydrone)\
**Replies:** 3\
**Last updated:** [March 4, 2009, 3:35am UTC](https://www.ruby-forum.com/t/using-join-on-associated-objects/161921 "2009-03-04T03:35:22Z")

</div>

I have a model, Download, with a HABTM relationship to another model, Product. In the index view for Download, I want to list all of the associated products by name. Here is my view code for the table row: I’ve tried…

---

## [An external API wants to call our action with a param of action=](https://www.ruby-forum.com/t/an-external-api-wants-to-call-our-action-with-a-param-of-action/161851)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 4\
**Last updated:** [March 3, 2009, 11:27pm UTC](https://www.ruby-forum.com/t/an-external-api-wants-to-call-our-action-with-a-param-of-action/161851 "2009-03-03T23:27:18Z")

</div>

Railsters: “Convention over Configuration” rules, right? Especially when you indeed have the option to configure, when you need to, right? An affiliate of ours needs to send us a param query with ‘action=’ in it. T…

---

## [Rake db:migrate not saving latest version #](https://www.ruby-forum.com/t/rake-db-migrate-not-saving-latest-version/161932)

<div class="topic-metadata">

**Author:** [@gsterndale](https://www.ruby-forum.com/u/gsterndale)\
**Replies:** 0\
**Last updated:** [March 3, 2009, 11:20pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-not-saving-latest-version/161932 "2009-03-03T23:20:50Z")

</div>

Howdy, I’m having some trouble migrating. From a fresh db, rake db:migrate runs successfully, with no errors. The tasks in the latest migration are performed with no problem. However, the latest version # is not sav…

---

## [New Browser Window using AJAX](https://www.ruby-forum.com/t/new-browser-window-using-ajax/161846)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 6\
**Last updated:** [March 3, 2009, 9:28pm UTC](https://www.ruby-forum.com/t/new-browser-window-using-ajax/161846 "2009-03-03T21:28:10Z")

</div>

Is it possible to create a new browser window popup with an ajax call? I want to open a new window and then trigger window.print() like google docs and maps. I know you can create new browser popups with link\_to by …

---

## [Multiple foreignkeys for same model with different meaning (User.received\_messages / User.sent\_mess](https://www.ruby-forum.com/t/multiple-foreignkeys-for-same-model-with-different-meaning-user-received-messages-user-sent-mess/161917)

<div class="topic-metadata">

**Author:** [@LpLpLp](https://www.ruby-forum.com/u/LpLpLp)\
**Replies:** 5\
**Last updated:** [March 3, 2009, 9:22pm UTC](https://www.ruby-forum.com/t/multiple-foreignkeys-for-same-model-with-different-meaning-user-received-messages-user-sent-mess/161917 "2009-03-03T21:22:53Z")

</div>

Hello, I have 2 models: User and Message Message: belongs\_to :sender, :class\_name=\>‘User’, :foreign\_key=\>‘sender\_id’ belongs\_to :receiver, :class\_name=\>‘User’, :foreign\_key=\>‘receiver\_id’ // MESSAGE-MIGRATION START …

---

## [Rails startup error in segments.rb](https://www.ruby-forum.com/t/rails-startup-error-in-segments-rb/159215)

<div class="topic-metadata">

**Author:** [@asoto](https://www.ruby-forum.com/u/asoto)\
**Replies:** 4\
**Last updated:** [March 3, 2009, 8:49pm UTC](https://www.ruby-forum.com/t/rails-startup-error-in-segments-rb/159215 "2009-03-03T20:49:39Z")

</div>

=\> Booting WEBrick… /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.2.2/lib/ action\_controller/routing/segments.rb:6: warning: encoding option is ignored - N =\> Rails 2.2.2 application started on http://0.0.0.0:3000 …

---

## [Passing an SQL fragment in AR save](https://www.ruby-forum.com/t/passing-an-sql-fragment-in-ar-save/161904)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 2\
**Last updated:** [March 3, 2009, 8:07pm UTC](https://www.ruby-forum.com/t/passing-an-sql-fragment-in-ar-save/161904 "2009-03-03T20:07:20Z")

</div>

I have a basic model class TestTime with no customization. class TestTime \< ActiveRecord::Base end I would like to pass the following SQL fragment as part of an AR save call to TestTime objects. How and where would …

---

## [Content delivery networks](https://www.ruby-forum.com/t/content-delivery-networks/161910)

<div class="topic-metadata">

**Author:** [@msojka](https://www.ruby-forum.com/u/msojka)\
**Replies:** 0\
**Last updated:** [March 3, 2009, 7:58pm UTC](https://www.ruby-forum.com/t/content-delivery-networks/161910 "2009-03-03T19:58:12Z")

</div>

I am authoring an article for Amazon Cloudfront. Are there recommended techniques for working with content delivery networks in Rails? I have seen and used ActionController::Base.asset\_host and am aware of the date pa…

---

## [Looks like a bug - Ruby1.9.1Rails2.3.0 - script/plugin](https://www.ruby-forum.com/t/looks-like-a-bug-ruby1-9-1rails2-3-0-script-plugin/161886)

<div class="topic-metadata">

**Author:** [@rick](https://www.ruby-forum.com/u/rick)\
**Replies:** 2\
**Last updated:** [March 3, 2009, 7:18pm UTC](https://www.ruby-forum.com/t/looks-like-a-bug-ruby1-9-1rails2-3-0-script-plugin/161886 "2009-03-03T19:18:09Z")

</div>

I started talking this one up yesterday - I’ve gotten as close to a good problem statement as I can. script/about: Ruby version 1.9.1 (powerpc-darwin9.6.0) RubyGems version 1.3.1 Rails versio…

---

## [@#$%ing forms using collection\_select](https://www.ruby-forum.com/t/ing-forms-using-collection-select/161905)

<div class="topic-metadata">

**Author:** [@frank\_programmer](https://www.ruby-forum.com/u/frank_programmer)\
**Replies:** 3\
**Last updated:** [March 3, 2009, 7:13pm UTC](https://www.ruby-forum.com/t/ing-forms-using-collection-select/161905 "2009-03-03T19:13:04Z")

</div>

Good morning, I have a form with 5 fields. When I click “Save”, 3 of the 5 fields save to the database and the other 2 are saved as NULL. The form code is attached. The 2 fields that will not save are using collecti…

---

## [Activity feeds for deletions (help on approach)](https://www.ruby-forum.com/t/activity-feeds-for-deletions-help-on-approach/159512)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 2\
**Last updated:** [March 3, 2009, 6:18pm UTC](https://www.ruby-forum.com/t/activity-feeds-for-deletions-help-on-approach/159512 "2009-03-03T18:18:14Z")

</div>

Hello guys, I created activity feeds for my project using a polymorphic model called feed. The table contains the following columns: resource\_id resource\_type user\_id project\_id Everytime I added a record its feed…

---

## [How to help in reviewing the "guides"](https://www.ruby-forum.com/t/how-to-help-in-reviewing-the-guides/161902)

<div class="topic-metadata">

**Author:** [@wpvanpaassen](https://www.ruby-forum.com/u/wpvanpaassen)\
**Replies:** 2\
**Last updated:** [March 3, 2009, 5:58pm UTC](https://www.ruby-forum.com/t/how-to-help-in-reviewing-the-guides/161902 "2009-03-03T17:58:34Z")

</div>

Hi, Thanks to the previous post, I just discovered the pages with the guides http://guides.rubyonrails.org/ Knowing myself, once I start reading, I will end up with a bunch of small comments all over the place (I te…

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

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