This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Wed Mar 12 10:46:23 -0700 2008 | [jackdempsey] |
| |
CHANGELOG | Wed Mar 12 00:13:25 -0700 2008 | [jackdempsey] |
| |
MIT-LICENSE | Wed Mar 12 00:13:25 -0700 2008 | [jackdempsey] |
| |
README | Wed Mar 12 10:46:05 -0700 2008 | [jackdempsey] |
| |
Rakefile | Wed Mar 12 10:46:05 -0700 2008 | [jackdempsey] |
| |
init.rb | Wed Mar 12 10:46:05 -0700 2008 | [jackdempsey] |
| |
install.rb | Wed Mar 12 00:13:25 -0700 2008 | [jackdempsey] |
| |
lib/ | Wed Mar 12 10:46:05 -0700 2008 | [jackdempsey] |
| |
tasks/ | Wed Mar 12 00:13:25 -0700 2008 | [jackdempsey] |
| |
test/ | Wed Mar 12 00:13:25 -0700 2008 | [jackdempsey] |
README
Acts As Commentable ================= Allows for comments to be added to multiple and different models. == Resources Install * To install as a plugin: script/plugin install http://juixe.com/svn/acts_as_commentable * To install as a gem: rake install * Create a new rails migration and add the following self.up and self.down methods def self.up create_table "comments", :force => true do |t| t.column "title", :string, :limit => 50, :default => "" t.column "comment", :text, :default => "" t.column "created_at", :datetime, :null => false t.column "commentable_id", :integer, :default => 0, :null => false t.column "commentable_type", :string, :limit => 15, :default => "", :null => false t.column "user_id", :integer, :default => 0, :null => false end add_index "comments", ["user_id"], :name => "fk_comments_user" end def self.down drop_table :comments end == Usage * 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 == Credits Xelipe - This plugin is heavily influced by Acts As Tagglable. == More http://www.juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/ http://www.juixe.com/projects/acts_as_commentable




