Sha256: 76b27e8c093105a01b48c70f79e982b41fb654ec55c79e920226d632724bebc2

Contents?: true

Size: 429 Bytes

Versions: 3

Compression:

Stored size: 429 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.base_class.name
      )
    ) if reflection.options[:sphinx_internal_filtered]

    constraint
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
thinking-sphinx-3.4.2 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-3.4.1 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-3.4.0 lib/thinking_sphinx/active_record/join_association.rb