acts_as_commentable
acts_as_commentable copied to clipboard
The ActiveRecord acts_as_commentable plugin
Basically just added ``` def define_role_based_inflection_5(role) has_many "#{role.to_s}_comments".to_sym, -> { where(role: role.to_s) }, has_many_options(role) end ``` For rails5 compatibility
added 'define_role_based_inflection_5' method
Hi. This was all there had to be done to get this running in my Rails 5 app. Did not have a closer look, but this might be a start...
I would like to store IP address from which the comment is send. How can I do it?
I tried using the gem and it showed me the error: "Could not find generator comment."
Ordering by id is faster than ordering by created_at, because id is an index unlike created_at. And it gives the same results because id is automatically incremented.
Just a small tidy up that I thought I'd pass on. Juixe::Acts::Commentable was being included in AR::Base with a ClassMethods module, and this ClassMethods module was being extended on AR::Base...
Currently, acts_as_commentable assumes a single (user) model. I would like to make the user association polymorphic, so that, for example, I can have user or admin model add comments. This...
On the acts_as_commentable rubygems page I see that the releases are somewhat out of date: 4.0.1 March 13, 2010 (6.5 KB) 4.0.0 March 13, 2010 (6.5 KB) 3.0.1 October 28,...
This allows bundler to resolve version dependencies correctly. Also, rails has been removed as a development dependency, since activerecord will suffice.