Class: FieldableForm::Validatable

Inherits:
OpenStruct
  • Object
show all
Includes:
ActiveModel::Validations
Defined in:
lib/fieldable_form/validatable.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Validatable

Returns a new instance of Validatable.



8
9
10
11
# File 'lib/fieldable_form/validatable.rb', line 8

def initialize(*args)
  @errors = ActiveModel::Errors.new(self)
  super(*args)
end

Instance Attribute Details

#errorsObject

Returns the value of attribute errors.



7
8
9
# File 'lib/fieldable_form/validatable.rb', line 7

def errors
  @errors
end

Class Method Details

.i18n_scopeObject



13
14
15
# File 'lib/fieldable_form/validatable.rb', line 13

def self.i18n_scope
  :activerecord
end