# File lib/thinking_sphinx/active_record/has_many_association_with_scopes.rb, line 4 def method_missing(method, *args, &block) if responds_to_scope(method) @reflection.klass. search(:with => default_filter). send(method, *args, &block) else super end end
# File lib/thinking_sphinx/active_record/has_many_association_with_scopes.rb, line 15 def responds_to_scope(scope) @reflection.klass.respond_to?(:sphinx_scopes) && @reflection.klass.sphinx_scopes.include?(scope) end