Module: ValidatesBySchema::ClassMethods
- Defined in:
- lib/validates_by_schema.rb
Instance Method Summary collapse
Instance Method Details
#load_schema! ⇒ Object
16 17 18 19 20 21 |
# File 'lib/validates_by_schema.rb', line 16 def load_schema! super # define schema validations lazy to avoid accessing the database # at class load time. define_schema_validations end |
#validates_by_schema(options = {}) ⇒ Object
11 12 13 14 |
# File 'lib/validates_by_schema.rb', line 11 def validates_by_schema( = {}) = define_schema_validations if schema_loaded? end |