search for: origin_country_id

Displaying 1 result from an estimated 1 matches for "origin_country_id".

2007 Mar 20
2
collection_select - why doesn't it work?
...#39;t know why. <%= form.collection_select :origin_country, Country.find(:all), :id, :name %> gives me a select list with name="member[origin_country]". When submitting the form the following error is shown: Country expected, got String When I try <%= form.collection_select :origin_country_id, Country.find(:all), :id, :name %> I get the error undefined method `origin_country_id'' for #<Member:0x23f52e8> So I try it with <%= form.select :origin_country, Country.find(:all).map{|obj| [obj.name, obj.id]} %> but again the same "Country expected, got String&qu...