Module: ThinkingSphinx::ActiveRecord::Depolymorph::OverriddenReflection::JoinScope

Defined in:
lib/thinking_sphinx/active_record/depolymorph/overridden_reflection.rb

Instance Method Summary collapse

Instance Method Details

#join_scope(table, foreign_table, foreign_klass) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/thinking_sphinx/active_record/depolymorph/overridden_reflection.rb', line 19

def join_scope(table, foreign_table, foreign_klass)
  super.where(
    foreign_table[options[:foreign_type]].eq(
      options[:class_name].constantize.base_class.name
    )
  )
end