Sha256: b5f313a38ef91e48027d8bf8a67286f7d284670b52a3d27d2faaf52ae44daa5c

Contents?: true

Size: 460 Bytes

Versions: 17

Compression:

Stored size: 460 Bytes

Contents

# frozen_string_literal: true

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

17 entries across 17 versions & 1 rubygems

Version Path
thinking-sphinx-5.6.0 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-5.5.1 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-5.5.0 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-5.4.0 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-5.3.0 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-5.2.1 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-5.2.0 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-5.1.0 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-5.0.0 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-4.4.1 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-4.4.0 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-4.3.2 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-4.3.1 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-4.3.0 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-4.2.0 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-4.1.0 lib/thinking_sphinx/active_record/join_association.rb
thinking-sphinx-4.0.0 lib/thinking_sphinx/active_record/join_association.rb