Similar to acts_as_commentable; however, utilizes awesome_nested_set to provide threaded comments
Pull request Compare This branch is 6 commits ahead, 62 commits behind elight:master.
Latest commit d85a8dd Dec 28, 2012 Tomasz Warkocki minor fixes
Failed to load latest commit information.
lib minor fixes Dec 28, 2012
rails Bumping to maintained version of awesome_nested_set Jul 8, 2011
CHANGELOG fixed issue that prevents the use of the acts_as_voteable plugin Mar 11, 2009
MIT-LICENSE minor fixes Dec 28, 2012
Rakefile Bump to 1.1.2 Mar 23, 2012
acts_as_commentable_with_threading.gemspec Bump to 1.1.2 Mar 23, 2012
init.rb more porting work for activerecord 3. convert special finders to scop… Sep 24, 2010
install.rb All specs pass already. Awesome. Nov 16, 2008

Acts As Commentable with Threading

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)


This gem is for Rails 3 and later versions only.

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


In your Gemfile, add:

gem 'acts_as_commentable_with_threading', git: ''

and run bundle install.


  • To install from scratch:

    rails generate acts_as_commentable_with_threading_migration

This will generate the migration script necessary for the table


class Car < ActiveRecord::Base
  acts_as_commentable :engine, :design
  • Add a comment to a model instance, for example an Car:

      @car = Car.find(params[:id])
      @comment = => "Hey guys this is my comment!")
      @comment.user = current_user
  • To make a newly created comment into a child/reply of another comment:

  • To retrieve all comments for an car, including child comments:

      @all_comments = @car.engine_comment_threads
  • To retrieve only the root comments without their child comments:

      @root_engine_comments = @car.root_engine_comments
  • To check if a comment has children:

  • To verify the number of children a comment has:

  • To retrieve a comment's children:

  • If you plan to use the acts_as_votable plugin with your comment system be sure to uncomment two things:


And in turn...

  • Xelipe - Because acts_as_commentable was heavily influenced by Acts As Taggable.