Sha256: 33894a161e27b292c6535fb859db4046732344c583eb219909b127f336563140
Contents?: true
Size: 533 Bytes
Versions: 35
Compression:
Stored size: 533 Bytes
Contents
module ThinkingSphinx module ActiveRecord module HasManyAssociationWithScopes 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 def responds_to_scope(scope) @reflection.klass.respond_to?(:sphinx_scopes) && @reflection.klass.sphinx_scopes.include?(scope) end end end end
Version data entries
35 entries across 35 versions & 3 rubygems