method

queries

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: AssociationQueryValue
queries() 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/association_query_value.rb, line 11
      def queries
        if associated_table.join_foreign_key.is_a?(Array)
          id_list = ids
          id_list = id_list.pluck(primary_key) if id_list.is_a?(Relation)

          id_list.map { |ids_set| associated_table.join_foreign_key.zip(ids_set).to_h }
        else
          [ associated_table.join_foreign_key => ids ]
        end
      end
Register or log in to add new notes.