Sha256: da0aa93854d945ae9ee1549386f7f4caaaa4d3e2d5a3b2663a79db6164195e05

Contents?: true

Size: 1.24 KB

Versions: 9

Compression:

Stored size: 1.24 KB

Contents

# frozen_string_literal: true

require "mr_common/engine"
require "icalendar"
require "icalendar/tzinfo"
require "carmen"
require "csv"

module MrCommon
  cattr_accessor :base_controller_name, default: "::ApplicationController"
  cattr_accessor :user_class_name, default: "::User"
  cattr_accessor :authentication_method_name, default: :authenticate_user!
  cattr_accessor :current_user_method_name, default: :current_user
  cattr_accessor :current_user_authorization_method_name, default: :mr_common_admin?
  cattr_accessor :logout_path_helper, default: :destroy_user_session_path
  cattr_accessor :logout_path_method, default: :delete
  cattr_accessor :sign_in_path_helper, default: :new_user_session_path
  cattr_accessor :registration_success_notice, default: "Registration completed successfully."
  cattr_accessor :registration_failure_alert, default: "Registration could not be completed."
  cattr_accessor :host_app_layout, default: "application"
  cattr_accessor :registration_confirmation_subject, default: "Your registration confirmation."
  cattr_accessor :title, default: "Mreach Common Utils"

  class << self
    def base_controller_class
      base_controller_name.constantize
    end

    def user_class
      user_class_name.constantize
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mr_common-1.3.0 lib/mr_common.rb
mr_common-1.2.0 lib/mr_common.rb
mr_common-1.1.0 lib/mr_common.rb
mr_common-1.0.5 lib/mr_common.rb
mr_common-1.0.4 lib/mr_common.rb
mr_common-1.0.3 lib/mr_common.rb
mr_common-1.0.2 lib/mr_common.rb
mr_common-1.0.1 lib/mr_common.rb
mr_common-1.0.0 lib/mr_common.rb