class method self.new

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

self.new(proxy_scope, options, &block)

No documentation comment.

Parameters

proxy_scope req
options req
block block
Source
# File activerecord/lib/active_record/named_scope.rb, line 119
      def initialize(proxy_scope, options, &block)
        options ||= {}
        [options[:extend]].flatten.each { |extension| extend extension } if options[:extend]
        extend Module.new(&block) if block_given?
        unless (Scope === proxy_scope || ActiveRecord::Associations::AssociationCollection === proxy_scope)
          @current_scoped_methods_when_defined = proxy_scope.send(:current_scoped_methods)
        end
        @proxy_scope, @proxy_options = proxy_scope, options.except(:extend)
      end

Defined in activerecord/lib/active_record/named_scope.rb line 119 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::NamedScope::Scope

Type at least 2 characters to search.

↑↓ navigate · open · esc close