[Rails] Re: getting a duplicate record with has_many and update_attributes

2010-04-17 Thread Bob Smith
this line was the problem.. @household = Household.new(params[:household]) it was saving the people records because they were linked to household, so a later @household.update_attributes(params[:household]) doubled the record. Changing the line to @household = Household.new() fixed the proble

[Rails] Re: getting a duplicate record with has_many and update_attributes

2010-04-12 Thread Bob Smith
I would have many records that match only the household_id that way. One for each month and year. I'm trying to get the record for this month. But that part works OK. The problem is with creating people objects. It works fine after the record is created with the correct records being changed, added

[Rails] Re: getting a duplicate record with has_many and update_attributes

2010-04-12 Thread Frederick Cheung
On 12 Apr, 05:25, Bob Smith wrote: > Please help. I've tried all i know with no results... > > I have an app with a master class using has_many to another class. > When I create a new record with the params showing all fields for > master and the has_many class it seems to work OK. But doing an