class method
self.new
Ruby on Rails 3.0.20
Since v3.0.20Signature
self.new(base)
Pass in the instance of the object that is using the errors object.
class Person def initialize @errors = ActiveModel::Errors.new(self) end end
Parameters
-
basereq
Source
# File activemodel/lib/active_model/errors.rb, line 74
def initialize(base)
@base = base
super()
end
Defined in activemodel/lib/active_model/errors.rb line 74
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Errors