Skip to content

Commit

Permalink
Update stats_controller.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
scotthillson committed Oct 9, 2024
1 parent bff8386 commit b13828d
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions app/controllers/admin/stats_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,13 @@ module Admin
class StatsController < Admin::AdminController
def index
@years = %w[2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024]
if params[:nopandemic]
@years = %w[2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2021 2022 2023 2024]
end
@racer_days_by_discipline = Stats.racer_days_by_discipline(@years)
@racers_by_discipline = Stats.racers_by_discipline(@years)
@total_racer_days = Stats.total_racer_days(@years)
@racer_days_by_gender = Stats.racer_days_by_gender(@years)
@racers_by_gender = Stats.racers_by_gender(@years)
@total_juniors = Stats.total_juniors(@years)
@memberships = Stats.memberships(@years)
end

def nopandemic
@years = %w[2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2021 2022 2023 2024]
@racer_days_by_discipline = Stats.racer_days_by_discipline(@years)
@racers_by_discipline = Stats.racers_by_discipline(@years)
@total_racer_days = Stats.total_racer_days(@years)
@total_juniors = Stats.total_juniors(@years)
@memberships = Stats.memberships(@years)
Expand Down

0 comments on commit b13828d

Please sign in to comment.