public
Description: The ActiveRecord acts_as_commentable plugin
Homepage: http://juixe.com/svn/acts_as_commentable/
Clone URL: git://github.com/jackdempsey/acts_as_commentable.git
Hoodow (author)
Sat Jul 25 16:23:42 -0700 2009
jackdempsey (committer)
Mon Aug 03 07:50:13 -0700 2009
name age message
file .gitignore Thu Oct 30 13:45:33 -0700 2008 add gem [Jim Ray]
file CHANGELOG Wed Jul 29 08:21:40 -0700 2009 try to be better about updating CHANGELOG [jackdempsey]
file MIT-LICENSE Wed Mar 12 00:13:25 -0700 2008 initial import into git [jackdempsey]
file OLD_README Wed Nov 05 05:57:16 -0800 2008 move out of way [jackdempsey]
file README Wed Jul 01 09:53:00 -0700 2009 added rails/init.rb to make using as a frozen g... [Matthew Van Horn]
file Rakefile Wed Jul 01 10:22:44 -0700 2009 update gemspec [jackdempsey]
file acts_as_commentable.gemspec Wed Jul 29 08:19:31 -0700 2009 bump up minor version [jackdempsey]
directory generators/ Wed Jul 29 08:17:16 -0700 2009 move setting of order to comment model. makes i... [jackdempsey]
file init.rb Wed Jul 01 09:53:00 -0700 2009 added rails/init.rb to make using as a frozen g... [Matthew Van Horn]
file install.rb Tue May 19 15:27:47 -0700 2009 Models should be generated, not stored in the p... [chriseppstein]
directory lib/ Mon Aug 03 07:50:13 -0700 2009 Ruby 1.9 compat \#type got removed, use #class [Hoodow]
directory rails/ Tue Jul 28 10:13:19 -0700 2009 correct the file path. fixes issue where AAC di... [jackdempsey]
directory tasks/ Wed Mar 12 00:13:25 -0700 2008 initial import into git [jackdempsey]
directory test/ Wed Mar 12 00:13:25 -0700 2008 initial import into git [jackdempsey]
README
Acts As Commentable
=================

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

== Resources

Install

  Rails

   * To install as a plugin:
 
    script/plugin install http://github.com/jackdempsey/acts_as_commentable.git

   * To install as a gem
   sudo gem install 

  Merb/Rails
  
   * To install as a gem:
    Run the following if you haven't already:
    gem sources -a http://gems.github.com

    Install the gem(s):
    sudo gem install jackdempsey-acts_as_commentable

    add the folloowing line to your environment.rb
    config.gem 'jackdempsey-acts_as_commentable', :lib => 'acts_as_commentable', :source => "http://gems.github.com"
   
 
 Generate your comment model:
 
 script/generate comment
 
 Then migrate your database:
 
 rake db:migrate

== Usage
 Merb Users:
 * add 'dependency "acts_as_commentable"' to your init.rb or dependencies.rb if using merb-stack
 
 * Make your ActiveRecord model act as commentable.
 
 class Model < ActiveRecord::Base
   acts_as_commentable
 end
 
 * Add a comment to a model instance
 
 commentable = Model.create
 commentable.comments.create(:title => "First comment.", :comment => "This is the first comment.")

 * Fetch comments for a commentable model:
 
 commentable = Model.find(1)
 comments = commentable.comments.recent.limit(10).all

 # Following doesn't work/make sense to me. Leaving for historical sake -- Jack
 # * Each comment reference commentable object
 #
 # model = Model.find(1)
 # model.comments.get(0).commentable == model

== Credits

Xelipe - This plugin is heavily influenced by Acts As Taggable.

== More

http://www.juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/
http://www.juixe.com/projects/acts_as_commentable