method

new

rails latest stable - Class: ActiveRecord::Error

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here.

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