Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Saving objects with associated has_one :throughs loaded broken

#2213

5cda000, which changed the autosave logic between rc1 & rc2, broke the save of any objects that have has_one :through associations :included.

The attached patch fixes this using the same bit of code used higher up in autosave_associations.rb, and adds spec coverage for has_one :through, has_one, and belongs_to to make sure they don't have the same problem.

Reported by Will Bryant · March 11th, 2009 @ 01:16 PM

State: resolved
Milestone: none
Assigned to: Pratik Pratik
Importance: Medium

Activity

  1. Eloy Duran
    Eloy Duran
    • Assigned user set to Eloy Duran
    • State changed from new to open
    • Milestone cleared.

    Patch applies and fixes mentioned problem. So +1.

    I just wonder if the tests shouldt be added to the "default" tests in autosave_association_test.rb.

    March 11th, 2009 @ 02:26 PM

  2. José Valim
  3. Eloy Duran
    Eloy Duran
    • State changed from open to verified
    • Assigned user changed from Eloy Duran to Pratik

    March 12th, 2009 @ 10:21 AM

  4. Repository
    Repository
    • State changed from verified to resolved

    (from [92dadf6d7927fde1482ba1d96d0916093bfb83ca]) Fixed autosave checks on objects with hm:t in :include [#2213 Saving objects with associated has_one :throughs loaded broken state:resolved]

    Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...

    March 12th, 2009 @ 02:36 PM