Sha256: 015338c905a8725a1aa71d2434f90f42e079ef90b18d4a1d58002d3cdb025591

Contents?: true

Size: 617 Bytes

Versions: 2

Compression:

Stored size: 617 Bytes

Contents

# Dummy application configuration file
Commontator.configure do |config|
  config.javascript_proc = lambda { |view| '// Some javascript' }

  config.user_name_proc = lambda { |user| user.try(:name) || 'Anonymous' }

  config.thread_read_proc = lambda { |thread, user| user && user.can_read }

  config.thread_moderator_proc = lambda { |thread, user| user.is_admin || user.can_edit }

  config.comment_voting = :ld

  config.thread_subscription = :m

  config.mentions_enabled = true

  config.user_mentions_proc = lambda { |current_user, query|
    'DummyUser'.include?(query) ? DummyUser.all : DummyUser.none }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
commontator-4.11.1 spec/dummy/config/initializers/commontator.rb
commontator-4.11.0 spec/dummy/config/initializers/commontator.rb