Monday, October 19, 2009

Acts as Commentable

This plugin easily integrates comments in your Rails application. It allows users to create comments in the model or models that you want.
Imagine that you have a user and a photo model. Now you want to allow users to create comments in the photos, acts as commentable do all that for you. You will only need to personalize your views to reflect the changes and maybe use some AJAX to make it more user friendly.

So, to install the Acts As Commentable plugin run the following command:
script/plugin install http://juixe.com/svn/acts_as_commentable

You can found the rest of the instructions on http://juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/

Remember that you can implement others fields on the comment migration. In my Rails application i added a commentable_owner_id to identify the owner o the commented photo. A popularity field that represents the level of popularity, a rating_size and rating_value, because all of my comments can also be voted (See Acts as Rateable post).

Greetings,
Hélder Loureiro

No comments:

Post a Comment