Sha256: 5ca65b91da0e40869372383a899723c83d9e8b3d23763d2d3ecb2cd000a3dc8a

Contents?: true

Size: 1.18 KB

Versions: 1

Compression:

Stored size: 1.18 KB

Contents

require 'active_support/core_ext/module/delegation'
require 'active_support/core_ext/module/attribute_accessors'
require 'active_support/hash_with_indifferent_access'

module Cmor
  module UserArea
    module Configuration
      def configure
        yield self
      end

      mattr_accessor(:enable_registrations) { false }
      mattr_accessor(:allow_users_to_destroy_self) { true }
      mattr_accessor(:base_controller) { 'FrontendController' }
      mattr_accessor(:base_mailer) { 'ApplicationMailer' }
      mattr_accessor(:acts_as_authentic_options) do
        ->(config) do
          config.crypto_provider = Authlogic::CryptoProviders::BCrypt
          config.login_field     = :email
        end
      end
      mattr_accessor(:application_name) { Rails.application.class.name.deconstantize }
      mattr_accessor(:email_from_address) do
        lambda do
          ENV['CMOR_USER_AREA_FROM_ADDRESS'] || 'info@example.com'
        end
      end
      mattr_accessor(:current_user_additional_table_rows_proc) { nil }
      mattr_accessor(:after_sign_in_url) { ->(controller) { main_app.root_path } }
      mattr_accessor(:after_sign_out_url) { ->(controller) { main_app.root_path } }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cmor_user_area-0.0.60.pre lib/cmor/user_area/configuration.rb