7 8 9 10 11 12 13
# File 'lib/activerecord_scoping_with_assoc/relation.rb', line 7 def scoping_with_assoc Thread.current[KEY] ||= {} Thread.current[KEY][klass] = true scoping { yield } ensure Thread.current[KEY] = nil end