instance method <<

Ruby on Rails 6.1.7.10

Since v6.1.7.10 Last seen in v6.1.7.10

Signature

<<(message)

No documentation comment.

Parameters

message req
Source
# File activemodel/lib/active_model/errors.rb, line 645
    def <<(message)
      ActiveSupport::Deprecation.warn("Calling `<<` to an ActiveModel::Errors message array in order to add an error is deprecated. Please call `ActiveModel::Errors#add` instead.")

      @errors.add(@attribute, message)
      __setobj__ @errors.messages_for(@attribute)
      self
    end

Defined in activemodel/lib/active_model/errors.rb line 645 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveModel::DeprecationHandlingMessageArray

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