Hi! I have updated my app to rails 2.3. I have form that has few nested models and I am happy that I can just write accepts_nested_attributes_for :tasks, :allow_destroy => true, but update_attributes! does not update my nested model. I have tried update_attributes, and it works. Any ideas? Few lines from log: update_attributes: SQL (0.1ms) BEGIN Education Update (0.3ms) UPDATE `educations` SET `institution` ''ins'', `updated_at` = ''2009-02-03 13:34:08'' WHERE `id` = 4 SQL (0.4ms) COMMIT update_attributes!: SQL (0.1ms) BEGIN SQL (0.1ms) COMMIT --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, I have uploaded a patch to fix this. Thanks for bringing it to my attention. http://rails.lighthouseapp.com/projects/8994/tickets/1877 Cheers, Eloy On Feb 3, 3:02 pm, darkofabijan <darko.fabi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi! > > I have updated my app to rails 2.3. I have form that has fewnested > models and I am happy that I can just write > accepts_nested_attributes_for :tasks, :allow_destroy => true, butupdate_attributes!doesnotupdatemynestedmodel. I have triedupdate_attributes, and it works. Any ideas? > > Few lines from log: > > update_attributes: > > SQL (0.1ms) BEGIN > EducationUpdate(0.3ms) UPDATE`educations` SET `institution` > ''ins'', `updated_at` = ''2009-02-03 13:34:08'' WHERE `id` = 4 > SQL (0.4ms) COMMIT > > update_attributes!: > SQL (0.1ms) BEGIN > SQL (0.1ms) COMMIT--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Apparently Analagous Threads
- update_attributes updates data from second instance of nested form but not the first
- Rails doesn't validate create_model or build_model (has_one association)
- “Routing Error No route matches {}” when omniauth failed on registration
- Puzzled with form on multiple table rows
- Arel quiz: complex queries with associations