Module: ActiveRecord::Scoping
- Extended by:
- ActiveSupport::Autoload, ActiveSupport::Concern
- Included in:
- Base
- Defined in:
- lib/active_record/scoping/named.rb,
lib/active_record.rb,
lib/active_record/scoping.rb,
lib/active_record/scoping/default.rb
Overview
Active Record Named Scopes
Defined Under Namespace
Modules: ClassMethods, Default, Named
Classes: ScopeRegistry
Instance Method Summary
collapse
Instance Method Details
#initialize_internals_callback ⇒ Object
30
31
32
33
|
# File 'lib/active_record/scoping.rb', line 30
def initialize_internals_callback
super
populate_with_current_scope_attributes
end
|
#populate_with_current_scope_attributes ⇒ Object
22
23
24
25
26
27
28
|
# File 'lib/active_record/scoping.rb', line 22
def populate_with_current_scope_attributes
return unless self.class.scope_attributes?
self.class.scope_attributes.each do |att,value|
send("#{att}=", value) if respond_to?("#{att}=")
end
end
|