trendable 1.2.0 → 1.2.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: 0f3496ff5b5f317e0ac19af1fc510daebab600b9
4
- data.tar.gz: 235bff5831a602bf1417f74b8157a8ac609bb8b8
3
+ metadata.gz: e33b5f509a93d24c5c1d0dc5facb22c2645f3b0a
4
+ data.tar.gz: 2c2bc2297ffe8e25c39e2c5adb8984335360a1e5
5
5
  SHA512:
6
- metadata.gz: 12e94fbaa8060d5fb3cae3464a8837318ba8e2e8f9b85e0bf9e1baae77dd287c773df29dbef8afebff42cd7cebf37fb8750e8ea9ce6395f1c5117785f7317072
7
- data.tar.gz: bfea558e138bc6ce0b0d61cc8636c70f140999902267bed6d9209b48fef7c736b9a482422057ffa3fc5b4ed247c43afd271eb1542ec2a17b88fa84a961745c43
6
+ metadata.gz: 2ac267a08e54525dc3fd0c8d714c419c782c3a226f5c20aee4a2346685a1ea4a83b6e7fcd626cf067e2c80c0f5ee2caf3c69b887905551aea3603ded06b6706f
7
+ data.tar.gz: 5ab690225845da9bcde22de113c589cad3e95c80b59f1258eb66096112ae6c60e0386deaed144ad32abd78345e845fbdaa9bd3b686ceee45ddb5c100377c1b7a
@@ -4,6 +4,7 @@ module Trendable
4
4
 
5
5
  included do
6
6
  scope :order_by_trending, -> { order( trending_power: :desc ) }
7
+ scope :items_to_fade_trending_power, -> { all }
7
8
 
8
9
  def self.has_trendable_concern?
9
10
  true
@@ -1,5 +1,5 @@
1
1
  module Trendable
2
2
  module Rails
3
- VERSION = "1.2.0"
3
+ VERSION = "1.2.1"
4
4
  end
5
5
  end
@@ -7,7 +7,7 @@ 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.update_all( "trending_power = trending_power * #{multiplier}")
10
+ klass.items_to_fade_trending_power.update_all( "trending_power = trending_power * #{multiplier}")
11
11
  else
12
12
  puts "#{klass.to_s} does not have trendable concern"
13
13
  end
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.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff McFadden