method

convert_to_id

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: PolymorphicArrayValue
convert_to_id(value) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/relation/predicate_builder/polymorphic_array_value.rb, line 44
        def convert_to_id(value)
          if value.is_a?(Base)
            value._read_attribute(primary_key(value))
          elsif value.is_a?(Relation)
            value.select(primary_key(value))
          else
            value
          end
        end
Register or log in to add new notes.