Method: ActiveModel::Errors#initialize

Defined in:
lib/active_model/errors.rb

#initialize(base) ⇒ Errors

Pass in the instance of the object that is using the errors object.

class Person
  def initialize
    @errors = ActiveModel::Errors.new(self)
  end
end


75
76
77
78
# File 'lib/active_model/errors.rb', line 75

def initialize(base)
  @base = base
  super()
end