Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: c22a550f2e
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (23 sloc) 0.609 kb
module ActiveRecord
module Scoping
extend ActiveSupport::Concern
included do
include Default
include Named
end
module ClassMethods
def current_scope #:nodoc:
Thread.current["#{self}_current_scope"]
end
def current_scope=(scope) #:nodoc:
Thread.current["#{self}_current_scope"] = scope
end
end
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
end
end
Jump to Line
Something went wrong with that request. Please try again.