volatile_counter_cache 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f9d0b55d8192eb79faa9f8506f36d5769938d6b
4
- data.tar.gz: 4888ae72f1df81d807c9a7a44f5f7f6adac06734
3
+ metadata.gz: eb5bad380e1f57743bae564fa92b9c79261fe72e
4
+ data.tar.gz: 35b7b320691efec7aa80b4638bf4db04a4eaafbb
5
5
  SHA512:
6
- metadata.gz: e6eb8151e1a22913a930faf2d90a6db41adbd9e4756656ca65d83df7d1fdcca41cebbca980950f8d21c7b680d034706036c607bf7fb576d39c403c0efdb13250
7
- data.tar.gz: 797ded2c954e407589e20281a4fa4753ef483ce9a87406832794ee4cb5d11e0c04956a920392080b6c1e09c93da690aac1cdd240356800cb6cb363b059bfe345
6
+ metadata.gz: 96e3406126a41570dd8541a2153e3ae8e97b781c114578669d5ac3e50232f3d76cda1caec64877dec2cb8a1d27d6ab7abcfd29cdd30fed28264bab820a2b23c5
7
+ data.tar.gz: 46edee5d9683ad85e9de065466446ed84cff30f9e1f480f3356988cb9a52d852b83c3f2cc0e0f29a341c1e7474b3f2589a80ba3a544599499165d64eaf60b82a
@@ -1,3 +1,6 @@
1
+ ## 0.0.4
2
+ - Use .size rather than .count
3
+
1
4
  ## 0.0.3
2
5
  - Add missing active_support dependency
3
6
 
data/README.md CHANGED
@@ -3,7 +3,7 @@ Provides volatile counter cache logic to ActiveRecord::Base.
3
3
 
4
4
  ## Usage
5
5
  1. `favorites_count` tries to read counter cache from Rails.cache.
6
- 2. If there is no cache yet, it calls `favorites.count` and store the result.
6
+ 2. If there is no cache yet, it calls `favorites.size` and store the result.
7
7
  3. When `favorite` is created or destroyed, the cache is purged.
8
8
 
9
9
  ```ruby
@@ -28,7 +28,7 @@ module VolatileCounterCache
28
28
 
29
29
  define_method(counter_method_name) do
30
30
  cache.fetch("#{cache_key_prefix}/#{id}", cache_options) do
31
- send(association_name).count
31
+ send(association_name).size
32
32
  end
33
33
  end
34
34
 
@@ -1,3 +1,3 @@
1
1
  module VolatileCounterCache
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: volatile_counter_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-29 00:00:00.000000000 Z
11
+ date: 2014-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport