module ActiveRecord::Scoping

def initialize_internals_callback # :nodoc:

:nodoc:
def initialize_internals_callback # :nodoc:
  super
  populate_with_current_scope_attributes
end

def populate_with_current_scope_attributes # :nodoc:

:nodoc:
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