class method self.new

Ruby on Rails 2.3.18

Since v2.3.18 Last seen in v2.3.18

Signature

self.new(base, attribute, type = nil, options = {})

No documentation comment.

Parameters

base req
attribute req
type opt = nil
options opt = {}
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

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close