Module: AmountField::ActiveRecord::Validations
- Defined in:
- lib/amount_field/validations.rb
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- @@configuration =
Note: Don’t use mattr_accessor here because it will define ‘def configuration=’ too which leads to error “ActiveRecord::DangerousAttributeError:configuration=” in case the AR model has an attribute ‘configuration’.
{}
Class Method Summary collapse
Class Method Details
.configuration ⇒ Object
9 |
# File 'lib/amount_field/validations.rb', line 9 def self.configuration; @@configuration; end |
.configuration=(c) ⇒ Object
8 |
# File 'lib/amount_field/validations.rb', line 8 def self.configuration=(c); @@configuration = c; end |
.included(base) ⇒ Object
:nodoc:
11 12 13 |
# File 'lib/amount_field/validations.rb', line 11 def self.included(base) # :nodoc: base.extend ClassMethods end |