Displaying 1 result from an estimated 1 matches for "m001752".
Did you mean:
1001752
2008 Jul 30
4
AssociationTypeMismatch: Genre expected, got String
Hi all
I have the following 2 models:
class CompactDisc < ActiveRecord::Base
belongs_to :genre
end
class Genre < ActiveRecord::Base
has_many :compact_discs
end
I have created a select box for my form so I can choose a genre for
every compact disc:
<p>
<b>Genre</b><br />
<%= f.select :genre, Genre.find(:all).collect{|p| [p.name, p.id]},
:selected =>