incrdecr_cached_counts 0.0.2 → 0.0.3

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: 4cdf727f62eeaba2d92b74a551ffc79fb43a3c9d
4
- data.tar.gz: 12cb21eed0b602030c5a0f2979cc57c553586136
3
+ metadata.gz: 5ea050eb7e1f6d2a0602f70e955b55a84a203468
4
+ data.tar.gz: 6150a6c504e7ff131ab5d228e3dd61b48225b39b
5
5
  SHA512:
6
- metadata.gz: 9c7287f505e948a84d597411cec421e543adf04df6a7d33f698c24b6cbfaa82a53af594d8d3fb5249c35b6c3589c9ace204baa8781118423fc1c3014fa66f333
7
- data.tar.gz: 6a40ec8e663b6a37ab74d2a7fe1c41f8b0b18e1e09edd5114f32cc9e11fd503cc37e5deb320eb2f56ed6bc1f2fe2328d3540a83fc97e13ded0197d474ef6173d
6
+ metadata.gz: 6741a345bd6731333ff5766af136da3f5ad059bd34e50586798804130484de3c24248a025bf396b86831cc48e5860d9f8a4697d8fd9d5a0f3ec7ff061d63f344
7
+ data.tar.gz: b25da87c5368e38f0d6e167a38e2141789a3ef1c58aa528ad234b1008da25562e52b57111ef77302f66a9973258fdfe9e2ae95d116bf026da97e0d309149a857
data/.gitignore CHANGED
@@ -1,6 +1,7 @@
1
1
  .bundle/
2
2
  log/*.log
3
3
  Gemfile.lock
4
+ incrdecr_cached_counts-*.gem
4
5
  pkg/
5
6
  test/dummy/db/*.sqlite3
6
7
  test/dummy/db/*.sqlite3-journal
@@ -1,3 +1,3 @@
1
1
  module CachedCounts
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/cached_counts.rb CHANGED
@@ -298,7 +298,7 @@ module CachedCounts
298
298
  counted_class.after_commit increment_hook, options.slice(:if).merge(on: :create)
299
299
 
300
300
  # This is ridiculous, but I can't find a better way to test for it
301
- need_without_protection = instance_method(:assign_attributes).arity > 1
301
+ need_without_protection = instance_method(:assign_attributes).arity != 1
302
302
 
303
303
  if (if_proc = options[:if])
304
304
  if if_proc.is_a?(Symbol)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: incrdecr_cached_counts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Judd