#450 ✓invalid
Bryan Larsen

Lifecycle callbacks still occur even if model did not validate & save.

Reported by Bryan Larsen | June 23rd, 2009 @ 12:49 AM | in Hobo 1.0 - Final

Document that lifecycle callbacks still occur even if model did not said.

Comments and changes to this ticket

  • Bryan Larsen

    Bryan Larsen October 22nd, 2009 @ 09:46 PM

    • Title changed from “Document that lifecycle callbacks still occur even if model did not said.” to “Document that lifecycle callbacks still occur even if model did not save.”
  • Tom Locke

    Tom Locke October 24th, 2009 @ 06:10 PM

    • State changed from “new” to “open”

    hmmm is this the behaviour what we want?

  • Bryan Larsen

    Bryan Larsen October 29th, 2009 @ 11:07 PM

    • Tag changed from docs, lifecycle to docs, enhancement, lifecycle
  • Matt Jones

    Matt Jones November 22nd, 2009 @ 06:23 PM

    @Tom - sounds more like a bug to me. I can't think of a good reason to fire the callback in that state.

  • Bryan Larsen

    Bryan Larsen November 24th, 2009 @ 03:48 PM

    • Tag changed from docs, enhancement, lifecycle to defect, lifecycle

    I think you're right -- when I opened the bug I was thinking that the behaviour was deliberate, there are things you sometimes want to do when a transition fails. However, they're likely to be in controller and/or view code, not in model code. Marking as defect.

  • Bryan Larsen

    Bryan Larsen November 24th, 2009 @ 03:55 PM

    • Title changed from “Document that lifecycle callbacks still occur even if model did not save.” to “Lifecycle callbacks still occur even if model did not validate & save.”
  • Bryan Larsen

    Bryan Larsen November 24th, 2009 @ 04:47 PM

    Note that this only happens when you call the methods internally -- If you call it via the form, things happen as you would expect.

  • Bryan Larsen

    Bryan Larsen November 24th, 2009 @ 06:34 PM

    • State changed from “open” to “invalid”

    unable to reproduce. Not totally wasted -- we did get a new integration test out of this bug.

  • Matt Jones

    Matt Jones November 24th, 2009 @ 08:52 PM

    I'm just a little baffled as to how we saw this from several different users at different times - even the Agility tutorial has a nod in this direction (the deliver_activation step checks if email_address is blank, which should have failed validation).

    Any ideas on what code caused this? I've spent an hour staring at everything, and couldn't see any relevant changes since the first report back around August...

  • Tom Locke

    Tom Locke November 25th, 2009 @ 10:37 AM

    Embrace the bafflement : )

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages