kasket 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/kasket.rb +1 -1
- data/lib/kasket/reload_association_mixin.rb +1 -6
- metadata +1 -1
data/lib/kasket.rb
CHANGED
@@ -1,12 +1,7 @@
|
|
1
1
|
module Kasket
|
2
2
|
module ReloadAssociationMixin
|
3
3
|
def reload_with_kasket_clearing(*args)
|
4
|
-
if
|
5
|
-
Kasket.clear_local if include?(WriteMixin)
|
6
|
-
else
|
7
|
-
target_class = proxy_reflection.options[:polymorphic] ? association_class : proxy_reflection.klass
|
8
|
-
Kasket.cache.delete_matched_local(/^#{target_class.kasket_key_prefix}/) if target_class.respond_to?(:kasket_key_prefix)
|
9
|
-
end
|
4
|
+
Kasket.clear_local if include?(WriteMixin)
|
10
5
|
|
11
6
|
reload_without_kasket_clearing(*args)
|
12
7
|
end
|