Class ActiveRecord::Base
In: lib/validations.rb
Parent: Object

Methods

Public Class methods

Creates an object and returns all validations without persisting

[Source]

     # 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

Returns the schema validations defined in the migration

[Source]

     # File lib/validations.rb, line 120
120:         def schema_validations
121:             FlexScaffold::Validations.new(name).get_schema_info
122:         end

[Validate]