instance method update_multiple_ids?

Ruby on Rails edge

Since edge Private — implementation detail, not part of the public API

Signature

update_multiple_ids?(id)

update/update! accept either a single id or an array of ids. For a composite primary key a single id is itself an array, so an array of ids is an array of arrays, mirroring how #destroy tells the two apart.

Parameters

id req
Source
# File activerecord/lib/active_record/relation.rb, line 1398
      def update_multiple_ids?(id)
        if model.composite_primary_key?
          id.is_a?(Array) && (id.empty? || id.first.is_a?(Array))
        else
          id.is_a?(Array)
        end
      end

Defined in activerecord/lib/active_record/relation.rb line 1398 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::Relation

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