> In new sequel_model I've found the next code (for example):
>
> chain.each {|h| break false if instance_eval(&h) == false}
>
> It not seems good about.
> I have meaningful == method in my model class, and it breaks this check.
> Why not to use just
>
> break false unless instance_eval(&h)
>
> ? (I think, reason may be not to break on nil, only on false, but it seems
> not to be very natural)
This is by design. Model hooks are expected to return false only if
you need to break the hook chain. This is also how hooks ("callbacks")
behave in ActiveRecord.
sharon
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---