Guest User

Untitled

a guest
Oct 20th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. class SomeModel < ActiveRecord::Base
  2. before_save :some_callback
  3. after_save :some_other_callback
  4.  
  5. # stuff...
  6.  
  7. def update_attributes_without_callbacks(attributes={})
  8. self.class.where(id: id).update_all(attributes)
  9. end
  10.  
  11. # more stuff...
  12.  
  13. end
Add Comment
Please, Sign In to add comment