rostra 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,13 +15,15 @@ module Rostra
15
15
  # Finds questions asked within the last 15 days ordered by non-unique page views.
16
16
  #
17
17
  def self.trending(limit = 5)
18
- return [] if Question.count.zero?
19
18
  Question
20
- .where(created_at: (15.days.ago)..(Time.now))
21
- .limit(limit)
22
- .joins(:impressions)
23
- .group('impressions.impressionable_id')
24
- .order('count(impressions.impressionable_id) desc')
19
+ .where(created_at: (15.days.ago)..(Time.now)).limit(limit)
20
+
21
+ # Question
22
+ # .where(created_at: (15.days.ago)..(Time.now))
23
+ # .limit(limit)
24
+ # .joins(:impressions)
25
+ # .group('impressions.impressionable_id')
26
+ # .order('count(impressions.impressionable_id) desc')
25
27
  end
26
28
 
27
29
  def answer_count
@@ -1,3 +1,3 @@
1
1
  module Rostra
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rostra
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.5
5
+ version: 0.0.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Cory Schires