Sha256: 74c1f77d6a67ca0ba51164a30500217d3328161cd56ac9b5592ad2530a5f50bd

Contents?: true

Size: 402 Bytes

Versions: 5

Compression:

Stored size: 402 Bytes

Contents

class ThinkingSphinx::ActiveRecord::JoinAssociation <
  ::ActiveRecord::Associations::JoinDependency::JoinAssociation

  def build_constraint(klass, table, key, foreign_table, foreign_key)
    constraint = super

    constraint = constraint.and(
      foreign_table[reflection.options[:foreign_type]].eq(base_klass.name)
    ) if reflection.options[:sphinx_internal_filtered]

    constraint
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
thinking-sphinx-3.3.0 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-3.2.0 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-3.1.4 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-3.1.3 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-3.1.2 lib/thinking_sphinx/active_record/join_association.rb