123456789_123456789_123456789_123456789_123456789_

Module: ActiveRecord::Scoping

Relationships & Source Files
Namespace Children
Modules:
Classes:
Extension / Inclusion / Inheritance Descendants
Included In:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
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

Class Method Summary

::ActiveSupport::Concern - Extended

class_methods

Define class methods from given block.

included

Evaluate given block in context of base class, so that you can write class macros here.

prepended

Evaluate given block in context of base class, so that you can write class macros here.

append_features, prepend_features

::ActiveSupport::Autoload - Extended

Instance Method Summary

DSL Calls

included

[ GitHub ]


9
10
11
12
# File 'activerecord/lib/active_record/scoping.rb', line 9

included do
  include Default
  include Named
end

Instance Method Details

#initialize_internals_callback

This method is for internal use only.
[ GitHub ]

  
# File 'activerecord/lib/active_record/scoping.rb', line 54

def initialize_internals_callback # :nodoc:
  super
  populate_with_current_scope_attributes
end

#populate_with_current_scope_attributes

This method is for internal use only.
[ GitHub ]

  
# File 'activerecord/lib/active_record/scoping.rb', line 47

def populate_with_current_scope_attributes # :nodoc:
  return unless self.class.scope_attributes?

  attributes = self.class.scope_attributes
  _assign_attributes(attributes) if attributes.any?
end