kasket 1.0.0 → 1.0.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/write_mixin.rb +5 -1
- metadata +3 -3
data/lib/kasket.rb
CHANGED
data/lib/kasket/write_mixin.rb
CHANGED
@@ -26,7 +26,7 @@ module Kasket
|
|
26
26
|
@kasket_key ||= new_record? ? nil : self.class.kasket_key_for_id(id)
|
27
27
|
end
|
28
28
|
|
29
|
-
def
|
29
|
+
def default_kasket_cacheable?
|
30
30
|
true
|
31
31
|
end
|
32
32
|
|
@@ -73,6 +73,10 @@ module Kasket
|
|
73
73
|
model_class.extend ClassMethods
|
74
74
|
model_class.send :include, InstanceMethods
|
75
75
|
|
76
|
+
unless model_class.method_defined?(:kasket_cacheable?)
|
77
|
+
model_class.send(:alias_method, :kasket_cacheable?, :default_kasket_cacheable?)
|
78
|
+
end
|
79
|
+
|
76
80
|
model_class.after_save :clear_kasket_indices
|
77
81
|
model_class.after_destroy :clear_kasket_indices
|
78
82
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kasket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 1
|
10
|
+
version: 1.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mick Staugaard
|