Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class SomeModel < ActiveRecord::Base
- before_save :some_callback
- after_save :some_other_callback
- # stuff...
- def update_attributes_without_callbacks(attributes={})
- self.class.where(id: id).update_all(attributes)
- end
- # more stuff...
- end
Add Comment
Please, Sign In to add comment