Open gayle opened 11 years ago
This is not a prod bug, only happens locally. So some change recently has caused this problem. Argh.
This is also a problem with creating a new family. Seems to be any time saving w/ nested attributes, it doesn't like it anymore.
When I revert to rails 2.3.9 the error also goes away. Rails 2.3.16 has the problem. (Doesn't seem to have a problem with the change from Sqlite to Postgres)
2.3.10 and up does not work. 2.3.9 still works. Sticking w/ that for now.
Error on screen says "undefined method `familyname' for nil:NilClass" but that's an error that comes from trying to display an informative error message.
The root problem is that in families_controller.rb > create(), this line is throwing an exception (I'm not sure why the stack trace isn't showing that anymore, but I copied and pasted what was there)
EXCEPTION:
ActiveRecord::RecordNotFound Exception: Couldn't find Participant with ID=101 for Family with ID=
C:/Ruby187. p370/lib/ruby/gems/1.8/gems/activerecord-2.3.16/lib/active_record/nested_attributes.rb:401:in
raise_nested_attributes_record_not_f ound'<br />C:/Ruby187.p370/lib/ruby/gems/1.8/gems/activerecord-2.3.16/lib/active_record/nested_attributes.rb:363:in
assignnested attributes_for_collection_association' BACTRACE: C:/Ruby187.p370/lib/ruby/gems/1.8/gems/activerecord-2.3.16/lib/active_record/nested_attributes.rb:401:inraise_nested_a ttributes_record_not_found' C:/Ruby187.p370/lib/ruby/gems/1.8/gems/activerecord-2.3.16/lib/active_record/nested_attributes.rb:363:in
assign_nested_att ributes_for_collection_association' C:/Ruby187.p370/lib/ruby/gems/1.8/gems/activerecord-2.3.16/lib/active_record/nested_attributes.rb:352:ineach' C:/Ruby187.p370/lib/ruby/gems/1.8/gems/activerecord-2.3.16/lib/active_record/nested_attributes.rb:352:in
assign_nested_att ributes_for_collection_association' C:/Ruby187.p370/lib/ruby/gems/1.8/gems/activerecord-2.3.16/lib/active_record/nested_attributes.rb:244:in `participants_attr