Class: AhoyCaptain::Stats::BounceRatesController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- ApplicationController
- BaseController
- AhoyCaptain::Stats::BounceRatesController
- Defined in:
- app/controllers/ahoy_captain/stats/bounce_rates_controller.rb
Constant Summary
Constants inherited from BaseController
AhoyCaptain::Stats::BaseController::INTERVALS, AhoyCaptain::Stats::BaseController::INTERVAL_PERIOD
Instance Method Summary collapse
-
#index ⇒ Object
@todo: this is lazy.
Methods inherited from ApplicationController
Methods included from Rangeable
Methods included from CompareMode
#compare_mode?, #comparison_mode, included
Instance Method Details
#index ⇒ Object
@todo: this is lazy
5 6 7 8 9 |
# File 'app/controllers/ahoy_captain/stats/bounce_rates_controller.rb', line 5 def index @stats = AhoyCaptain::Stats::BounceRatesQuery.call(params) @stats = lazy_window(@stats.with_lazy_comparison(compare_mode?).group_by_period(selected_interval, "daily_bounce_rate.date").average("bounce_rate")) @label = "Bounce Rate" end |