class Form::ActiveModel::Validations::Validator

Public Class Methods

attr_reader(*) click to toggle source

Prevent AM:V from mutating the validator class

# File lib/reform/form/active_model/validations.rb, line 222
def attr_reader(*)
end
attr_writer(*) click to toggle source
# File lib/reform/form/active_model/validations.rb, line 225
def attr_writer(*)
end
model_name() click to toggle source
# File lib/reform/form/active_model/validations.rb, line 209
def model_name
  @_active_model_sucks ||= ActiveModel::Name.new(Reform::Form, nil, "Reform::Form")
end
model_name=(name) click to toggle source
# File lib/reform/form/active_model/validations.rb, line 213
def model_name=(name)
  @_active_model_sucks = name
end
new(form) click to toggle source
Calls superclass method Form::ActiveModel::Validations::new
# File lib/reform/form/active_model/validations.rb, line 229
def initialize(form)
  super(form)
  self.class.model_name = form.model_name
end
validates(*args, &block) click to toggle source
Calls superclass method
# File lib/reform/form/active_model/validations.rb, line 217
def validates(*args, &block)
  super(*Declarative::DeepDup.(args), &block)
end

Public Instance Methods

method_missing(m, *args, &block) click to toggle source
# File lib/reform/form/active_model/validations.rb, line 234
def method_missing(m, *args, &block)
  __getobj__.send(m, *args, &block) # send all methods to the form, even privates.
end