Module: ActiveRecord::Scoping
- Extended by:
- ActiveSupport::Autoload, ActiveSupport::Concern
- Included in:
- Base
- Defined in:
- activerecord/lib/active_record/scoping/named.rb,
activerecord/lib/active_record.rb,
activerecord/lib/active_record/scoping.rb,
activerecord/lib/active_record/scoping/default.rb
Overview
Active Record Named Scopes
Defined Under Namespace
Modules: ClassMethods, Default, Named
Instance Method Summary collapse
Methods included from ActiveSupport::Concern
append_features, extended, included
Methods included from ActiveSupport::Autoload
autoload, autoload_at, autoload_under, autoloads, eager_autoload, eager_autoload!
Instance Method Details
#populate_with_current_scope_attributes ⇒ Object
143 144 145 146 147 148 149 |
# File 'activerecord/lib/active_record/scoping.rb', line 143 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 |