0.0
No release in over a year
RailsComments is a modern comments engine for Ruby on Rails.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 7.0.4
 Project Readme

RailsComments

Still in beta

A modern way to add comments to your Rails app powered by Hotwire.

Installation

Add this line to your application's Gemfile:

gem "rails_comments"

And then execute:

$ bundle

Usage

  1. Include the RailsComments::Commentable module to the model you want to add comments.
class Post < ApplicationRecord
  include RailsComments::Commentable
end
  1. Add the assets to your layout file
<!-- app/views/layouts/application.html.erb -->
<%= rails_comments_assets %>
  1. Add the thread to your model's show page.
<!-- app/views/posts/show.html.erb -->
<%= comments_for @post %>
  1. Mount the engine
# config/routes.rb
mount RailsComments::Engine => "/rails_comments"
  1. Copy the migrations
bin/rails rails_comments:install:migrations
bin/rails db:migrate

Still to do

There are still a few things that need to be done in order to make this a full-featured commenting gem. If you want to help out we're glad to help you navigate the codebase.

  • send emails
  • custom author (the database supports that the external APIs don't)

License

The gem is available as open source under the terms of the MIT License.