Sha256: 3cbd667e6a3c6fb634718c0698dae6786ffb618688158fc41c5094077299c0b6

Contents?: true

Size: 649 Bytes

Versions: 18

Compression:

Stored size: 649 Bytes

Contents

module ActiveRecord
  module NamedScope
    class Scope

      delegate :member_class, :to => :proxy_found

      include Hobo::Scopes::ApplyScopes

      def respond_to?(method, include_private=false)
        super || scopes.include?(method) || proxy_scope.respond_to?(method, include_private)
      end
      
      private
      
      def method_missing(method, *args, &block)
        if respond_to?(method) && scopes.include?(method)
          scopes[method].call(self, *args)
        else
          with_scope :find => proxy_options do
            proxy_scope.send(method, *args, &block)
          end
        end
      end

    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
hobo-1.1.0.pre0 lib/hobo/scopes/named_scope_extensions.rb
hobo-1.0.1 lib/hobo/scopes/named_scope_extensions.rb
hobo-1.0.0 lib/hobo/scopes/named_scope_extensions.rb
hobo-0.9.106 lib/hobo/scopes/named_scope_extensions.rb
hobo-0.9.105 lib/hobo/scopes/named_scope_extensions.rb
hobo-0.9.104 lib/hobo/scopes/named_scope_extensions.rb
hobo-0.9.103 lib/hobo/scopes/named_scope_extensions.rb
hobo-0.9.102 lib/hobo/scopes/named_scope_extensions.rb
hobo-0.9.101 lib/hobo/scopes/named_scope_extensions.rb
hobo-0.9.100 lib/hobo/scopes/named_scope_extensions.rb
hobo-0.9.0 lib/hobo/scopes/named_scope_extensions.rb
hobo-0.8.10 lib/hobo/scopes/named_scope_extensions.rb
hobo-0.8.9 lib/hobo/scopes/named_scope_extensions.rb
hobo-0.8.8 lib/hobo/scopes/named_scope_extensions.rb
hobo-0.8.5 lib/hobo/scopes/named_scope_extensions.rb
hobo-0.8.4 lib/hobo/scopes/named_scope_extensions.rb
hobo-0.8.6 lib/hobo/scopes/named_scope_extensions.rb
hobo-0.8.7 lib/hobo/scopes/named_scope_extensions.rb