From d627215af44b6dbc42efc1278401233146123f5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 10 Dec 2018 14:47:47 +0100 Subject: [PATCH] Use symbols for method names --- app/models/budget/stats.rb | 2 +- app/models/concerns/statisticable.rb | 2 +- app/models/poll/stats.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/budget/stats.rb b/app/models/budget/stats.rb index 0b1d6d459..acbd93139 100644 --- a/app/models/budget/stats.rb +++ b/app/models/budget/stats.rb @@ -3,7 +3,7 @@ class Budget::Stats alias_method :budget, :resource def stats_methods - %w[total_participants total_participants_support_phase total_participants_vote_phase + %i[total_participants total_participants_support_phase total_participants_vote_phase total_budget_investments total_votes total_selected_investments total_unfeasible_investments total_male_participants total_female_participants total_supports total_unknown_gender_or_age age_groups male_percentage diff --git a/app/models/concerns/statisticable.rb b/app/models/concerns/statisticable.rb index db46d88dc..2751b7447 100644 --- a/app/models/concerns/statisticable.rb +++ b/app/models/concerns/statisticable.rb @@ -9,7 +9,7 @@ module Statisticable end def generate - stats_methods.map { |stat_name| [stat_name.to_sym, send(stat_name)] }.to_h + stats_methods.map { |stat_name| [stat_name, send(stat_name)] }.to_h end end end diff --git a/app/models/poll/stats.rb b/app/models/poll/stats.rb index 4b2452545..e855097ea 100644 --- a/app/models/poll/stats.rb +++ b/app/models/poll/stats.rb @@ -4,7 +4,7 @@ class Poll::Stats alias_method :poll, :resource def stats_methods - %w[total_participants total_participants_web total_web_valid total_web_white total_web_null + %i[total_participants total_participants_web total_web_valid total_web_white total_web_null total_participants_booth total_booth_valid total_booth_white total_booth_null total_valid_votes total_white_votes total_null_votes valid_percentage_web valid_percentage_booth total_valid_percentage white_percentage_web white_percentage_booth total_white_percentage