Class: ThinkingSphinx::ActiveRecord::JoinAssociation
- Inherits:
-
ActiveRecord::Associations::JoinDependency::JoinAssociation
- Object
- ActiveRecord::Associations::JoinDependency::JoinAssociation
- ThinkingSphinx::ActiveRecord::JoinAssociation
- Defined in:
- lib/thinking_sphinx/active_record/join_association.rb
Instance Method Summary collapse
Instance Method Details
#build_constraint(klass, table, key, foreign_table, foreign_key) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/thinking_sphinx/active_record/join_association.rb', line 6 def build_constraint(klass, table, key, foreign_table, foreign_key) constraint = super constraint = constraint.and( foreign_table[reflection.[:foreign_type]].eq( base_klass.base_class.name ) ) if reflection.[:sphinx_internal_filtered] constraint end |