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
77 78 79 80 |
# File 'lib/active_model/errors.rb', line 77 def initialize(base) @base = base = ActiveSupport::OrderedHash.new end |