Guest User

Untitled

a guest
Feb 20th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. module Validations
  2. def validate_on_destroy
  3. end
  4.  
  5. module ClassMethods
  6. def validate_on_destroy(*methods, &block)
  7. methods << block if block_given?
  8. write_inheritable_set(:validate_on_destroy, methods)
  9. end
  10. end
  11. end
Add Comment
Please, Sign In to add comment