Guest User

Untitled

a guest
Jul 17th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. # encoding: utf-8
  2. module Mongoid #:nodoc:
  3. module Callbacks
  4. extend ActiveSupport::Concern
  5. included do
  6. extend ActiveModel::Callbacks
  7.  
  8. # Define all the callbacks that are accepted by the document.
  9. define_model_callbacks \
  10. :destroy,
  11. :initialize,
  12. :save,
  13. :create,
  14. :update,
  15. :validation
  16. end
  17.  
  18. def valid?(*) #nodoc
  19. _run_validation_callbacks { super }
  20. end
  21. end
  22. end
Add Comment
Please, Sign In to add comment