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.

avoid calling #valid? on destroyed associated records

#2761

An associated record may be invalid in memory even though it has been destroyed in the database. This should not prevent the parent object from being valid.

Reported by cainlevy · June 4th, 2009 @ 09:21 PM

State: resolved
Milestone: 2.3.6
Assigned to: Eloy Duran Eloy Duran
Importance: none

Activity

  1. cainlevy
    cainlevy

    It'd probably help if I hadn't commented out the code that, you know, does stuff.

    Eloy also suggested aliasing #frozen? to #destroyed? for better semantics.

    June 4th, 2009 @ 11:00 PM

  2. Eloy Duran
    Eloy Duran
    • State changed from new to verified
    • Milestone changed from 2.x to 2.3.4

    I have verified and applied this patch on my branch of 2-3-stable, which Micheal will look at and merge in before 2.3.4.

    http://github.com/alloy/rails/commit/c6cd7638dc72e241d8251538a9c6ea...

    Thanks!

    July 12th, 2009 @ 12:44 PM

  3. cainlevy
    cainlevy

    Looks like it didn't make it in. Bump to next milestone?

    September 8th, 2009 @ 08:08 PM

  4. Dmitry Polushkin
  5. Eloy Duran
    Eloy Duran

    Yes very unfortunate, sorry. I suspect the sudden urge to get a release out because of the security fixes caused this. I'll communicate with Michael to make sure we get it in 2.3.5.

    September 9th, 2009 @ 09:41 AM

  6. Jeremy Kemper
    Jeremy Kemper
    • Milestone changed from 2.3.4 to 2.3.6

    [milestone:id#50064 bulk edit command]

    September 11th, 2009 @ 11:04 PM

  7. Repository
  8. Repository