Ensure shared default_scoping stack is duped before assigning to thread local

This commit is contained in:
Joshua Peek
2008-11-16 13:51:04 -06:00
parent 8c197fb4ab
commit e6c51051e4

View File

@@ -2045,7 +2045,7 @@ module ActiveRecord #:nodoc:
end
def scoped_methods #:nodoc:
Thread.current[:"#{self}_scoped_methods"] ||= self.default_scoping
Thread.current[:"#{self}_scoped_methods"] ||= self.default_scoping.dup
end
def current_scoped_methods #:nodoc: