Sha256: 5c85f5027e2786693dc90da575cf806fa34f258d29016c93f6f61c4cc2bae082

Contents?: true

Size: 1.45 KB

Versions: 3

Compression:

Stored size: 1.45 KB

Contents

module Faalis::Configuration

  # Configure logger
  mattr_accessor :logger
  @@logger = Logger.new(STDOUT)

  # Dashboard url prefix
  mattr_accessor :dashboard_namespace
  @@dashboard_namespace = :dashboard

  # ==> ORM configuration
  # Load and configure the ORM. Supports :active_record (default) and
  # :mongoid (bson_ext recommended) by default. Other ORMs may be
  # available as additional gems.
  # ORM name to use. either 'active_record' or 'mongoid'
  mattr_accessor :orm

  def orm=(orm_name)
    @@orm = orm_name
    require "devise/orm/#{orm_name}"
  end

  # We have to move this method somewhere else
  def collect_i18n_missing_keys=(value)
    if value
      ::I18n.exception_handler = Faalis::I18n::MissingKeyHandler.new
    end
  end

  # Site Title
  attr_accessor :site_title
  @site_title = 'Faalis'

  mattr_accessor :slug

  # Dashboard default javascript manifest
  mattr_accessor :dashboard_js_manifest
  @@dashboard_js_manifest = 'dashboard/application.js'

  # Devise options
  # Include default devise modules. Others available are:
  # :token_authenticatable, :confirmable,
  # :lockable, :timeoutable and :omniauthable
  mattr_accessor :devise_options
  @@devise_options = [:database_authenticatable,
                      :registerable,
                      :recoverable,
                      :rememberable,
                      :trackable,
                      :lockable,
                      :timeoutable,
                      :validatable]
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
faalis-2.0.4 lib/faalis/configuration.rb
faalis-2.0.3 lib/faalis/configuration.rb
faalis-2.0.1 lib/faalis/configuration.rb