class ActiveRecord::Error

def initialize(base, attribute, type = nil, options = {})

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