TracksApp/tracks — pull request #158 by kytrinyx (2013-03-01 21:10:48+00:00)
Title: Extract tag cloud into separate class

I'm submitting this for feedback more than anything else.

The tag cloud logic had some duplication in it where it lived in the controller, and by extracting it to a class, we can call the class twice: once for the _all time_ tag cloud, and once for the _90 days_ tag cloud, and then pass those two objects to the view, instead of the six instance variables.

Also, we could then delete half of the `_tags` partial and call it twice, once with each object.

I took the liberty of adding a non-active-record ruby class to the `app/models` directory. I don't actually have strong opinions about where classes like this belong. I'm happy to put them in either `lib` or `app/models` or anywhere else, if there's a preference in the project.

Thoughts?