From ac4a483b1805e6777ea4e9e38c54538d7088d851 Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Sat, 2 Mar 2013 17:24:05 -0700 Subject: [PATCH] Inline helper method --- app/controllers/stats_controller.rb | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/app/controllers/stats_controller.rb b/app/controllers/stats_controller.rb index ec435cb8..1fc22166 100644 --- a/app/controllers/stats_controller.rb +++ b/app/controllers/stats_controller.rb @@ -12,8 +12,10 @@ class StatsController < ApplicationController @totals = Stats::Totals.new(current_user) @projects = Stats::Projects.new(current_user) @contexts = Stats::Contexts.new(current_user) - - get_stats_tags + tags = Stats::TagCloudQuery.new(current_user).result + @tag_cloud = Stats::TagCloud.new(tags) + tags = Stats::TagCloudQuery.new(current_user, @cut_off_3months).result + @tag_cloud_90days = Stats::TagCloud.new(tags) end def actions_done_last12months_data @@ -383,14 +385,6 @@ class StatsController < ApplicationController @cut_off_3months = 3.months.ago.beginning_of_day end - def get_stats_tags - tags = Stats::TagCloudQuery.new(current_user).result - @tag_cloud = Stats::TagCloud.new(tags) - - tags = Stats::TagCloudQuery.new(current_user, @cut_off_3months).result - @tag_cloud_90days = Stats::TagCloud.new(tags) - end - def get_ids_from (actions, week_from, week_to, at_end) selected_todo_ids = []