Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cycle_analytics_params.rb « concerns « controllers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 52e06f4945a570c4c65fe381ca07b86963e1a904 (plain)
1
2
3
4
5
6
7
8
9
10
11
module CycleAnalyticsParams
  extend ActiveSupport::Concern

  def options(params)
    @options ||= { from: start_date(params), current_user: current_user }
  end

  def start_date(params)
    params[:start_date] == '30' ? 30.days.ago : 90.days.ago
  end
end