Sha256: 9934f62882cbc757c6ac1faf4336c7bef10a7b81136a087a7c75c2fe4fe607e7

Contents?: true

Size: 803 Bytes

Versions: 6

Compression:

Stored size: 803 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, counter_cache: true %>
  
  ### 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

6 entries across 6 versions & 1 rubygems

Version Path
acts_as_commentable_more-1.2.5 lib/generators/commentable/templates/comment.rb
acts_as_commentable_more-1.2.4 lib/generators/commentable/templates/comment.rb
acts_as_commentable_more-1.2.3 lib/generators/commentable/templates/comment.rb
acts_as_commentable_more-1.2.2 lib/generators/commentable/templates/comment.rb
acts_as_commentable_more-1.2.1 lib/generators/commentable/templates/comment.rb
acts_as_commentable_more-1.2.0 lib/generators/commentable/templates/comment.rb