0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Hello world version of a commenting gem
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
= 2.14.1

Runtime

>= 4
 Project Readme

lazy_comments

Not that anyone will use this, but it's good to state so. This is not suitable for real use

Simple commenting gem that gives you tag any AR model with has_comments and adding comments to it.

Requirements

  • Rails 4
  • ActiveRecord
  • Haml (currently, generated views use HAML only)

Installation

gem 'lazy_comments'
rails g comments # Generates controllers, models, views and migrations

Usage

class Post < ActiveRecord::Base
  has_comments
end

Add a comment to your model:

post = Post.new
post.comments.build(message: "hello") 

Find Comments:

post = Post.find(13)
Comment.for_subject(post)
post.comments.where(user: current_user)

Comments belonging to a group:

# Essentially group is a string that can be anything
Comment.in_group("hello_world")

Helpers

Feature not committed yet, coming soon!