Sha256: c10399143f4245854d77f5b154f027780c737b57addccfb381e84b8fba3fe764

Contents?: true

Size: 1.15 KB

Versions: 6

Compression:

Stored size: 1.15 KB

Contents

require 'thredded/engine'
require 'cancan'
require 'carrierwave'
require 'griddler'
require 'kaminari'
require 'friendly_id'
require 'nested_form'
require 'thredded/email_processor'
require 'thredded/errors'
require 'thredded/filter/base'
require 'thredded/at_notifier'
require 'thredded/filter/at_notification'
require 'thredded/filter/attachment'
require 'thredded/filter/bbcode'
require 'thredded/filter/emoji'
require 'thredded/filter/markdown'
require 'thredded/messageboard_user_permissions'
require 'thredded/post_user_permissions'
require 'thredded/private_topic_user_permissions'
require 'thredded/topic_user_permissions'

module Thredded
  mattr_accessor :user_class,
    :email_incoming_host,
    :email_from,
    :email_outgoing_prefix,
    :user_path

  def self.user_class
    if @@user_class.is_a?(Class)
      raise 'Please use a string instead of a class'
    end

    if @@user_class.is_a?(String)
      begin
        Object.const_get(@@user_class)
      rescue NameError
        @@user_class.constantize
      end
    end
  end

  def self.user_path(user)
    if @@user_path.respond_to? :call
      @@user_path.call(user)
    else
      '/'
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
thredded-0.0.10 lib/thredded.rb
thredded-0.0.9 lib/thredded.rb
thredded-0.0.8 lib/thredded.rb
thredded-0.0.7 lib/thredded.rb
thredded-0.0.6 lib/thredded.rb
thredded-0.0.5 lib/thredded.rb