instance method cast_primary_key

Ruby on Rails edge

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

Signature

cast_primary_key(id)

No documentation comment.

Parameters

id req
Source
# File activerecord/lib/active_record/relation/finder_methods.rb, line 575
      def cast_primary_key(id)
        model.primary_key_definition.cast(id, model)
      end

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

Defined in ActiveRecord::FinderMethods

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