Sha256: 66957030ffb6d1133ab338718561f7aec283db12b54d435da18055c5851faf19
Contents?: true
Size: 782 Bytes
Versions: 1
Compression:
Stored size: 782 Bytes
Contents
class <%= class_name %> < ActiveRecord::Base ################################################################### ### To implement commentable add the following line to your model ### acts_as_commentable types: [:hide, :show], options: { class_name: '<%= class_name %>', as: :<%= class_name.demodulize.underscore + "able" %> }, as: :<%= class_name.demodulize.downcase.pluralize %> ### types is an array of possible comment type ### for example if you have public and private comment ### your types would be [:public, :private] include ActsAsCommentableMore::Finders belongs_to :<%= class_name.demodulize.underscore + "able" %>, :polymorphic => true belongs_to :user, polymorphic: true ################################################################### end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
acts_as_commentable_more-1.1.0 | lib/generators/commentable/templates/comment.rb |