Guest User

Untitled

a guest
Jun 22nd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. module Foo
  2. def before_validation_foo
  3. ...
  4. true
  5. end
  6.  
  7. def self.included(base)
  8. base.before_validation :before_validation_foo
  9. end
  10. end
  11.  
  12.  
  13. # model
  14.  
  15. include Foo
  16.  
  17. def bar
  18. ...
  19. end
  20.  
  21. before_validation :bar
  22.  
  23. ## before_validation_foo never gets called
Add Comment
Please, Sign In to add comment