module ThinkingSphinx::ActiveRecord::HasManyAssociationWithScopes

Public Instance Methods

method_missing(method, *args, &block) click to toggle source
Calls superclass method
# 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

Private Instance Methods

responds_to_scope(scope) click to toggle source
# 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