method

call

rails latest stable - Class: ActiveRecord::PredicateBuilder::AssociationQueryHandler

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v5.1.7) is shown here.

call(attribute, value)
public

No documentation available.

# File activerecord/lib/active_record/relation/predicate_builder/association_query_handler.rb, line 19
      def call(attribute, value)
        queries = {}

        table = value.associated_table
        if value.base_class
          queries[table.association_foreign_type.to_s] = value.base_class.name
        end

        queries[table.association_foreign_key.to_s] = value.ids
        predicate_builder.build_from_hash(queries)
      end