Displaying 1 result from an estimated 1 matches for "musicstyle".
Did you mean:
basicstyle
2007 Mar 18
7
How to get more informations about an association at runtime
...ll
I''m working on a Custom Formbuilder. I want it to create me with a
single method call checkboxes for a given HABTM association.
My model looks like this:
[code=ruby]class Member < ActiveRecord::Base
has_and_belongs_to_many :preferred_music_styles,
:class_name => ''MusicStyle'',
:join_table => ''members_have_preferred_music_styles''
end
[/code]
In my view I''d like to do the following:
[code=rhtml]<%= form.checkboxes :preferred_music_styles %>[/code]
The method checkboxes() should now create a set of checkboxes; one for
ea...