trendable 1.3.1 → 1.4.0

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: 46f180c8e8596a86a6012cb26169de159d18364b
4
- data.tar.gz: 31f097bf8a8655bcc72be47ae575df04e0bf23cd
3
+ metadata.gz: 871c3002aa95c0d592834e6dbfdf346166cd2afc
4
+ data.tar.gz: 05e21e33898ea412c7251e41812e22a4d98cb689
5
5
  SHA512:
6
- metadata.gz: cfaaeacc4d8d6c61425351604f53769d225c24a692a0b90e1e88b1b2570ca5ffc3b23b8e09d2a853ceaf7537f69d21bf4e1c75cbf8111ce3586d1a220451c002
7
- data.tar.gz: 5263b37866e85594d8e04aadfd2cc5d0694aef628a8a5ba277e1ac58577743a80f40204496204a17b907f06eab10c2d332225e93dd21b08837d486b851eb641c
6
+ metadata.gz: 1e83c6d60662b650e6935cb64ef094746e71330e98a172d5f5b35559851753a381bfac4404ff1b64dbe06995d602b9d2a741f673fb37339869ac531c0dc01596
7
+ data.tar.gz: 522680533ef03bf913b77d857ad4e96eb9b781405f52010186e31aa7b6a352e29d69131ef9fcefad982058292381374fd2b8427eb5084fdd3a873f9600901f8d
@@ -12,12 +12,20 @@ module Trendable
12
12
 
13
13
  end
14
14
 
15
- def boost_trending_power!( add_value = 1000 )
16
- self.update_attributes( trending_power: trending_power + add_value )
15
+ def boost_trending_power!( add_value = 1000, dont_touch: false )
16
+ if dont_touch
17
+ self.update_columns( trending_power: trending_power + add_value )
18
+ else
19
+ self.update_attributes( trending_power: trending_power + add_value )
20
+ end
17
21
  end
18
22
 
19
- def fade_out_trending_power!( multiplier = 0.9 )
20
- self.update_attributes( trending_power: trending_power * multiplier )
23
+ def fade_out_trending_power!( multiplier = 0.9, dont_touch: false )
24
+ if dont_touch
25
+ self.update_columns( trending_power: trending_power * multiplier )
26
+ else
27
+ self.update_attributes( trending_power: trending_power * multiplier )
28
+ end
21
29
  end
22
30
  end
23
31
  end
@@ -1,5 +1,5 @@
1
1
  module Trendable
2
2
  module Rails
3
- VERSION = "1.3.1"
3
+ VERSION = "1.4.0"
4
4
  end
5
5
  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.3.1
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff McFadden