Sha256: 5d39f9241c608014414044148692987f03c5b8fec7ac3126ef38f8aa77182343

Contents?: true

Size: 1.43 KB

Versions: 7

Compression:

Stored size: 1.43 KB

Contents

module Commontator
  # Attributes

  # Can be set in initializer only
  ENGINE_ATTRIBUTES = [
    :current_user_method,
    :javascript_proc
  ]

  # Can be set in initializer or passed as an option to acts_as_commontator
  COMMONTATOR_ATTRIBUTES = [
    :user_missing_name,
    :user_name_clickable,
    :subscription_emails,
    :user_email_method,
    :user_name_method,
    :user_admin_proc
  ]
  
  # Can be set in initializer or passed as an option to acts_as_commontable
  COMMONTABLE_ATTRIBUTES = [
    :comment_name,
    :comment_create_verb_present,
    :comment_create_verb_past,
    :commontable_name,
    :timestamp_format,
    :admin_can_edit_comments,
    :auto_subscribe_on_comment,
    :can_edit_own_comments,
    :can_edit_old_comments,
    :can_delete_own_comments,
    :can_delete_old_comments,
    :can_subscribe_to_thread,
    :can_vote_on_comments,
    :comments_ordered_by_votes,
    :closed_threads_are_readable,
    :deleted_comments_are_visible,
    :commontable_id_method,
    :can_edit_thread_proc,
    :can_read_thread_proc,
    :commontable_url_proc,
    :subscription_email_subject_proc
  ]
  
  (ENGINE_ATTRIBUTES + COMMONTATOR_ATTRIBUTES + \
    COMMONTABLE_ATTRIBUTES).each do |attribute|
    mattr_accessor attribute
  end
  
  def self.configure
    yield self
  end
end

require 'commontator/engine'
require 'commontator/acts_as_commontator'
require 'commontator/acts_as_commontable'
require 'commontator/controller_includes'

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
commontator-1.0.6 lib/commontator.rb
commontator-1.0.5 lib/commontator.rb
commontator-1.0.4 lib/commontator.rb
commontator-1.0.3 lib/commontator.rb
commontator-1.0.2 lib/commontator.rb
commontator-1.0.1 lib/commontator.rb
commontator-1.0.0 lib/commontator.rb