jipiboily/monologue — pull request #83 by msevestre (2012-06-11 19:48:01+00:00)
Title: Tag cloud

I have done a little bit of refactoring and implemented to more widget: TagCloud and Category
**ApplicationController:**
* new method `all_tags` which creates a few variables used to display the cateogory widget and the tag_cloud widget
**in ApplicationHelper:**
* new `sidebar_section_for` method which takes a title and a block as parameter. It allows to stay DRY (Definition of section, header etc.. is only at one place).
* new method `size_for_tag` which takes a tag and returns the size used for the css

It would be much better to define this methods in a specific helper. I am not sure however if it is possible to define a helper for a partial?

Last but not least: We might have an issue with the basic implementation of tags. I have used the `has_and_belongs_to_many` but I am starting to believe that it would have been better to use a `has_many through..` We would be able then to cache the count for a tag using a counter_cache.

Could you check the implementation? We could discuss that live if you wish :*)