method

convert_value_to_association_ids

Importance_0
v4.2.9 - Show latest stable - 0 notes - Class: ActiveRecord::PredicateBuilder
convert_value_to_association_ids(value, primary_key) public

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.rb, line 136
    def self.convert_value_to_association_ids(value, primary_key)
      case value
      when Relation
        value.select(primary_key)
      when Array
        value.map { |v| convert_value_to_association_ids(v, primary_key) }
      when Base
        value._read_attribute(primary_key)
      else
        value
      end
    end
Register or log in to add new notes.