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 CHANGED
@@ -14,7 +14,7 @@ module Kasket
14
14
  class Version
15
15
  MAJOR = 1
16
16
  MINOR = 0
17
- PATCH = 0
17
+ PATCH = 1
18
18
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
19
19
  end
20
20
 
@@ -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 kasket_cacheable?
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: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mick Staugaard