method
new
rails latest stable - Class:
ActiveRecord::Error
new(base, attribute, type = nil, options = {})public
No documentation available.
# 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