class method
self.new
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v2.3.18Signature
self.new(base, attribute, type = nil, options = {})
No documentation comment.
Parameters
-
basereq -
attributereq -
typeopt = nil -
optionsopt = {}
Source
# File activerecord/lib/active_record/validations.rb, line 21
def initialize(base, attribute, type = nil, options = {})
self.base = base
self.attribute = attribute
self.type = type || :invalid
self.options = options
self.message = options.delete(:message) || self.type
end
Defined in activerecord/lib/active_record/validations.rb line 21
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Error