On Oct 19, 4:58 pm, David Lee <[email protected]> wrote:
> > 1) Skips saving completely if the record has not been modified.
>
> > 2) Saves only the changed columns if the record has been modified.
>
> I agree with this behavior. What I'm calling into question is if
> skipping saving should also skip all hooks. I think a more compelling
> case is the #after_update hook, which you would expect to be called
> after #update whether or not the method call actually issued an UPDATE
> statement.

Because of the way the internals work, this wouldn't be easy to do
cleanly.  Can you give me an example of an after_update hook you are
using that you would want to be run regardless?

I think we might want to add a note to the documentation about it, but
I don't think it's worth changing the current behavior.

Note that Sequel makes it easy to do:

def update(*)
  s = super
  ...
  s
end

Jeremy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to