Displaying 1 result from an estimated 1 matches for "leg_id".
Did you mean:
le_id
2005 Nov 16
3
Association collections problems
Hi all!
I find association collections to be quite hard to understand and use.
I have a Leg class that has_many :choices, and a Choice class that
belongs_to :leg. In a controller I want to update both a Leg and its
Choices. If I do it like this:
@leg.choices.update params[:choice].keys, params[:choice].values
It updates the database directly (or more specifically only updates
records that