Class: ActiveRecord::Scoping::DefaultScope

Inherits:
Object
  • Object
show all
Defined in:
lib/active_record/scoping/default.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope, all_queries = nil) ⇒ DefaultScope

Returns a new instance of DefaultScope.



8
9
10
11
# File 'lib/active_record/scoping/default.rb', line 8

def initialize(scope, all_queries = nil)
  @scope = scope
  @all_queries = all_queries
end

Instance Attribute Details

#all_queriesObject (readonly)

Returns the value of attribute all_queries.



6
7
8
# File 'lib/active_record/scoping/default.rb', line 6

def all_queries
  @all_queries
end

#scopeObject (readonly)

Returns the value of attribute scope.



6
7
8
# File 'lib/active_record/scoping/default.rb', line 6

def scope
  @scope
end