Thx for the fast response! I will do it like you suggest, i thought were is maybe something like in rails:
update_colums - just update db and skip validations and hooks update_attributes - do all stuff Do you thought about that to integrate or is that for you a no go to build in cause of bypass all? Am Donnerstag, 29. Dezember 2016 16:30:43 UTC+1 schrieb Jeremy Evans: > > On Thursday, December 29, 2016 at 7:23:08 AM UTC-8, Quackerjack wrote: >> >> Hey, >> >> is there an update method i can use on objects which doesn't trigger >> model callbacks in sequel? >> >> All methods i know - 'update', 'update_all' and 'save' - trigger callback >> runs. >> >> Thx in advance! >> > > In Sequel, you can bypass validation, but not hooks. Many plugins are > implemented using hooks, and skipping the hooks would break code that uses > such plugins. > > You would have to set a flag before saving and modify your hook code to > check it: > > class Foo < Sequel::Model > def after_save > super > return if @skip_hooks > # ... > end > > def skip_hooks! > @skip_hooks = true > end > end > -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
