class ActiveRecord::Base
Public Class Methods
acts_as_comment(*args)
click to toggle source
# File lib/parole.rb, line 25 def self.acts_as_comment(*args) include Parole::Comment end
acts_as_commentable(options = {})
click to toggle source
# File lib/parole.rb, line 10 def self.acts_as_commentable(options = {}) Parole.commentable_classes << self class_attribute :commentable_options, :actually_acts_as_commentable self.actually_acts_as_commentable = true self.commentable_options = options.reverse_merge(roles: []) self.commentable_options[:roles] = commentable_options[:roles].map(&:to_s) include Parole::Commentable end
acts_as_commentable?()
click to toggle source
# File lib/parole.rb, line 21 def self.acts_as_commentable? self.respond_to?(:actually_acts_as_commentable) && self.actually_acts_as_commentable end
Public Instance Methods
commentable?()
click to toggle source
# File lib/parole.rb, line 29 def commentable? self.class.acts_as_commentable? end