Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
damireh committed Feb 3, 2012
1 parent e1b381a commit 7ab2aa1
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 62 deletions.
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Acts As Commentable

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

### Forked
* Added Rails 3.2 support
* Removed default scope on comments

### Installation

`gem install "acts_as_commentable"`

If using bundler then just add
`gem "acts_as_commentable"` to your Gemfile
and
`bundle install`

Generate your comment model:

`rails g comment`

Then migrate your database:

`rake db:migrate`

### Usage

Make your ActiveRecord model act as commentable.

class Post < ActiveRecord::Base
acts_as_commentable
end

Add a comment to a model instance

post = Post.create
post.comments.create(:comment => "my first comment!")

Fetch comments for a commentable model:

post = Post.find(1)
comments = post.comments.recent.limit(10).all


### Credits

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

###### Contributors

Jack Dempsey, Chris Eppstein, Jim Ray, Matthew Van Horn, Ole Riesenberg, ZhangJinzhu, maddox, monocle

###### More

[http://www.juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/](http://www.juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/)
[http://www.juixe.com/projects/acts_as_commentable](http://www.juixe.com/projects/acts_as_commentable)
62 changes: 0 additions & 62 deletions README.rdoc

This file was deleted.

0 comments on commit 7ab2aa1

Please sign in to comment.