Class: AhoyCaptain::Stats::ViewsPerVisitsController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- ApplicationController
- BaseController
- AhoyCaptain::Stats::ViewsPerVisitsController
- Defined in:
- app/controllers/ahoy_captain/stats/views_per_visits_controller.rb
Constant Summary
Constants inherited from BaseController
BaseController::INTERVALS, BaseController::INTERVAL_PERIOD
Instance Method Summary collapse
Methods inherited from ApplicationController
Methods included from Rangeable
Methods included from CompareMode
#compare_mode?, #comparison_mode, included
Instance Method Details
#index ⇒ Object
4 5 6 7 8 |
# File 'app/controllers/ahoy_captain/stats/views_per_visits_controller.rb', line 4 def index @stats = lazy_window(AhoyCaptain::Stats::ViewsPerVisitQuery.call(params).with_lazy_comparison(compare_mode?).group_by_period(selected_interval, 'views_per_visit_table.started_at').average(:views_per_visit)) @label = "Views" end |