Module: SchemaValidations::ActiveRecord::Validations

Defined in:
lib/schema_validations/active_record/validations.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) define_attribute_methods

:nodoc:



17
18
19
20
# File 'lib/schema_validations/active_record/validations.rb', line 17

def define_attribute_methods(*) #:nodoc:
  super
  load_schema_validations
end

- (Object) schema_validations(opts)

Per-model override of Config options. Use via, e.g.

class MyModel < ActiveRecord::Base
    schema_associations :auto_create => false
end


9
10
11
# File 'lib/schema_validations/active_record/validations.rb', line 9

def schema_validations(opts)
  @schema_validations_config = SchemaValidations.config.merge(opts)
end

- (Object) schema_validations_config

:nodoc:



13
14
15
# File 'lib/schema_validations/active_record/validations.rb', line 13

def schema_validations_config # :nodoc:
  @schema_validations_config ||= SchemaValidations.config.dup
end