Sha256: a8b64213fa58edfcc457f69ed503d37f320fbffa1bde935b04d5a3322c7df542

Contents?: true

Size: 728 Bytes

Versions: 1

Compression:

Stored size: 728 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" %> }
  
  ### 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.0.0 lib/generators/commentable/templates/comment.rb