2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-03-29 05:54:56 -04:00
|
|
|
Report.add_report("mobile_visits") do |report|
|
|
|
|
basic_report_about report, UserVisit, :mobile_by_day, report.start_date, report.end_date
|
|
|
|
report.total = UserVisit.where(mobile: true).count
|
|
|
|
report.prev30Days = UserVisit.where(mobile: true).where("visited_at >= ? and visited_at < ?", report.start_date - 30.days, report.start_date).count
|
|
|
|
end
|