Sha256: f29dc3d98c01514d0b1dace4d5097696f5277f7bdd06c3200187729247bccb69

Contents?: true

Size: 847 Bytes

Versions: 7

Compression:

Stored size: 847 Bytes

Contents

Rails.application.configure do
    config.after_initialize do
        # In development be sure to load all the namespaces
        # in order to have working reflection and meta-programming.
        Zeitwerk::Loader.eager_load_all if Rails.env.development?
        
        Ability.send(:include, ThecoreAuthCommonsCanCanCanConcern)
        User.send(:include, ThecoreAuthCommonsUserConcern)
        # User.devise_modules.delete(:recoverable) if ThecoreSettings::Setting.where(ns: :devise, key: :recoverable).first.present? && ThecoreSettings::Setting.where(ns: :devise, key: :recoverable).first.raw == "disable"
        # User.devise_modules.delete(:registerable) if ThecoreSettings::Setting.where(ns: :devise, key: :registerable).first.present? && ThecoreSettings::Setting.where(ns: :devise, key: :registerable).first.raw == "disable"
    end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
thecore_auth_commons-3.0.13 config/initializers/after_initialize.rb
thecore_auth_commons-3.0.12 config/initializers/after_initialize.rb
thecore_auth_commons-3.0.11 config/initializers/after_initialize.rb
thecore_auth_commons-3.0.10 config/initializers/after_initialize.rb
thecore_auth_commons-3.0.9 config/initializers/after_initialize.rb
thecore_auth_commons-3.0.8 config/initializers/after_initialize.rb
thecore_auth_commons-3.0.7 config/initializers/after_initialize.rb