elight / acts_as_commentable_with_threading

Similar to acts_as_commentable; however, utilizes awesome_nested_set to provide threaded comments
MIT License
672 stars 167 forks source link

Build Status Code Climate

Acts As Commentable (now with comment threads(TM)!!! -- kidding on the (TM))

Allows for threaded comments to be added to multiple and different models. Drop-in compatible for acts_as_commentable (however requiring a database schema change)

Requirements

The 2.x version of this gem is for Rails 4 and later versions only. For the Rails 3.x compatible version of this gem, please use version 1.2.0.

This gem depends on CollectiveIdea's Awesome Nested Set gem. It is installed if not already present when you install this gem.

You can find the gem on GitHub at collectiveidea/awesome_nested_set

Install

In your Gemfile, add:

gem 'acts_as_commentable_with_threading'

and run bundle install.

Migrations

If the generators fail, you can just as easily create the migrations by hand. See the templates in the generators under lib/generators.

Usage

class Article < ActiveRecord::Base
  acts_as_commentable
end

Credits

And in turn...

More