Showing posts with label rails. Show all posts
Showing posts with label rails. Show all posts

2009-03-26

Notes on acts-as-taggable-on

If you're using acts-as-taggable-on, you may have noticed the documentation is a bit… sparse. The following are some of the more helpful resources I've found.

  • The README from Acts as Taggable on Steroids (the inspriation for acts-as-taggable-on)
  • crunchytoast.com has a nice documentation effort

Finally, I ran into errors with trying to build a tag cloud when there were no tags to count. My solution was to embed


    @tags = Post.tag_counts || []

(or similar) into whichever method on the controller was responsible for the page to contain the tag cloud so that the default is an empty list instead of nil.

Back to flipping out...

2009-03-20

Mental Note: In Rails 2.3, application.rb -> application_controller.rb

Rails 2.3.2 apparently forgot to rename app/controllers/application.rb to app/controllers/application_controller.rb, so Getting Started with Rails fails with the following error:


uninitialized constant ApplicationController

A simple mv should fix things right up.

Back to flipping out...