Module: JSONModel::Validations
- Defined in:
- lib/jsonmodel/validations.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods Classes: ArrayValidator
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/jsonmodel/validations.rb', line 4 def self.included(base) base.class_eval do include ActiveModel::Validations include InstanceMethods # Need to do it this way so valid?() can call super from ActiveModel extend ClassMethods def self.validators_on(*args) setup_validations! super end def self.validators(*args) setup_validations! super end end end |