Extract methods in tag cloud

This gets rid of the compute method, and makes each value that got set
in it its own little method.
This commit is contained in:
Katrina Owen 2013-02-28 21:53:19 -05:00
parent 447178bd7d
commit 61e04a8258
2 changed files with 30 additions and 15 deletions

View file

@ -553,14 +553,12 @@ class StatsController < ApplicationController
def get_stats_tags
cloud = Stats::TagCloud.new(current_user)
cloud.compute
@tags_for_cloud = cloud.tags
@tags_min = cloud.min
@tags_divisor = cloud.divisor
cloud = Stats::TagCloud.new(current_user, @cut_off_3months)
cloud.compute
@tags_for_cloud_90days = cloud.tags
@tags_min_90days = cloud.min
@tags_divisor_90days = cloud.divisor