| Class | ActiveRecord::Base |
| In: |
lib/validations.rb
|
| Parent: | Object |
Creates an object and returns all validations without persisting
# File lib/validations.rb, line 111
111: def new_validations
112: object = new # this triggers the validations so that they are captured
113: schema = schema_validations
114: object.instance_variable_set(:@validations, schema.merge(validations) )
115: unset_aliases
116: object
117: end