Acts As Commentable plugin

Plugin details

Allows for comments to be added to multiple and different models.

Websitehttp://www.juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/ Repositoryhttp://juixe.com/svn/acts_as_commentable/ Tags comment LicenseRuby's (MIT)

Documentation

Install the plugin:
ruby script/plugin install http://juixe.com/svn/acts_as_commentable/

* Make you ActiveRecord model act as commentable.

class Model < ActiveRecord::Base
acts_as_commentable
end


* Add a comment to a model instance

model = Model.new
comment = Comment.new
comment.comment = 'Some comment'
model.comments << comment


* Each comment reference commentable object

model = Model.find(1)
model.comments.get(0).commtable == model

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | Back in time (1 older version) | Last edited by: scott, 9 months ago