5
6
7
8
9
10
11
|
# File 'lib/activerecord_scoping_with_assoc/association.rb', line 5
def target_scope
if Thread.current[KEY] && Thread.current[KEY][klass] == true
ActiveRecord::AssociationRelation.create(klass, self).merge!(klass.current_scope)
else
super
end
end
|