Rails forms for has_many through association with additional attributes?
问题 How can I generate form fields for a has_many :through association that has additional attributes? The has_many :through relationship has an additional column called weight . Here's the migration file for the join table: create_table :users_widgets do |t| t.integer :user_id t.integer :widget_id t.integer :weight t.timestamps end The models look like this: User has_many :widgets, :through => :users_widgets, :class_name => 'Widget', :source => :widget has_many :users_widgets accepts_nested