popularable 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: 7e979b1fa4cea6c06ffe15b203b29a79457c68f2
4
- data.tar.gz: 240ec42fce12117ddaa1d22d42958013b735a336
3
+ metadata.gz: 6d5d0056f22c9c1348639c3b615db3f61184066d
4
+ data.tar.gz: d54cf8bafe044acdcfa0858e272ad5d2a893ad47
5
5
  SHA512:
6
- metadata.gz: 271bb74de44fb2bd37196347347aae4a6fb13e7d3697ff0fb433488a5b424f61e70ee4004fbb0885d3fa8888eaff7119a838e591b464993587ac76e7c9b2104c
7
- data.tar.gz: 713c2e4266b42a12133d87ad966f90b4a430e1abff297172e94826711740e5b6eed6361eb71297e522617582e48addb71b0e3570a6bd8d4dcfb7e6f68ecdca8a
6
+ metadata.gz: 96b141d5644a04fc72a899d2b5287da8c3d11dc2bcc9da959ec54f1e95594486bf692fd1b889681074e584cf7bad3742fda17cc2fd13228caac48d1cf344bee8
7
+ data.tar.gz: 790045a66684616d1d774c5e711b58b33dacc1aa63f9e27a01cc6558029221527908c095a77d9a23899e8b420dfb9f59de34a44813febb1dd29b6c060dadb831
@@ -26,7 +26,7 @@ module Popularable
26
26
  }
27
27
 
28
28
  scope :popular_since, -> (since){
29
- select( "#{self.table_name}.*, 0 + SUM(popularable_popularity_events.popularity) AS popularity").joins( "LEFT OUTER JOIN popularable_popularity_events ON (#{self.table_name}.id = popularable_popularity_events.popularable_id AND popularable_popularity_events.popularable_type = '#{self.to_s}')").where( "popularable_popularity_events.popularity_event_date >= ?", since.to_date ).group( "#{MediaItem.table_name}.id" ).order( "popularity DESC" )
29
+ select( "#{self.table_name}.*, 0 + SUM(popularable_popularity_events.popularity) AS popularity").joins( "LEFT OUTER JOIN popularable_popularity_events ON (#{self.table_name}.id = popularable_popularity_events.popularable_id AND popularable_popularity_events.popularable_type = '#{self.to_s}')").where( "popularable_popularity_events.popularity_event_date >= ?", since.to_date ).group( "#{self.table_name}.id" ).order( "popularity DESC" )
30
30
  }
31
31
 
32
32
  has_many :popularable_popularity_events, as: :popularable
@@ -1,5 +1,5 @@
1
1
  module Popularable
2
2
  module Rails
3
- VERSION = "1.2.0"
3
+ VERSION = "1.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: popularable
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