trendable 1.3.0 → 1.3.1

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: 32ecf8010770ec345054ea87407d863e5f4966d9
4
- data.tar.gz: 7ffbd65da9234dd1bf102b6bb86952785a1118c9
3
+ metadata.gz: 46f180c8e8596a86a6012cb26169de159d18364b
4
+ data.tar.gz: 31f097bf8a8655bcc72be47ae575df04e0bf23cd
5
5
  SHA512:
6
- metadata.gz: 56a8f3a7d12d86fc23b55a28c92e0830c7039d1b5d22ae0bdb898d3ff168d605125ed3ebc34a88cd8f41d3a0924f368b45c1e745ec90b569ebd335a2be3df9ea
7
- data.tar.gz: d5148efd4cea79d4c0832336f19d3393c5983dcdfb7c560353b1eda2f7a21b17537ddc5477d521f4a1fcd692ebaaec17b0ea2aba83ea81053f5200f89650a805
6
+ metadata.gz: cfaaeacc4d8d6c61425351604f53769d225c24a692a0b90e1e88b1b2570ca5ffc3b23b8e09d2a853ceaf7537f69d21bf4e1c75cbf8111ce3586d1a220451c002
7
+ data.tar.gz: 5263b37866e85594d8e04aadfd2cc5d0694aef628a8a5ba277e1ac58577743a80f40204496204a17b907f06eab10c2d332225e93dd21b08837d486b851eb641c
@@ -1,5 +1,5 @@
1
1
  module Trendable
2
2
  module Rails
3
- VERSION = "1.3.0"
3
+ VERSION = "1.3.1"
4
4
  end
5
5
  end
@@ -7,8 +7,8 @@ class FadeOutTrendPowerWorker
7
7
  ActiveRecord::Base.descendants.each do |klass|
8
8
  if klass.respond_to?( "has_trendable_concern?".to_sym )
9
9
 
10
- klass.items_to_fade_trending_power.find_in_batches( batch_size: batch_size ) do |batch|
11
- batch.update_all( "trending_power = trending_power * #{multiplier}")
10
+ klass.items_to_fade_trending_power.select( :id ).find_in_batches( batch_size: batch_size ) do |batch|
11
+ klass.where( id: batch.collect{ |i| i.id } ).update_all( "trending_power = trending_power * #{multiplier}")
12
12
  end
13
13
  else
14
14
  puts "#{klass.to_s} does not have trendable concern"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trendable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff McFadden