User Visits count for 30 days ago was always 0
This commit is contained in:
parent
b6a6581b3c
commit
202addb693
|
@ -3,6 +3,6 @@ class UserVisit < ActiveRecord::Base
|
|||
|
||||
# A list of visits in the last month by day
|
||||
def self.by_day(since=30.days.ago)
|
||||
where("visited_at > ?", since).group(:visited_at).order(:visited_at).count
|
||||
where("visited_at >= ?", since).group(:visited_at).order(:visited_at).count
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue