Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Validations
- def validate_on_destroy
- end
- module ClassMethods
- def validate_on_destroy(*methods, &block)
- methods << block if block_given?
- write_inheritable_set(:validate_on_destroy, methods)
- end
- end
- end
Add Comment
Please, Sign In to add comment