Sha256: 4e16c3d985a887ceeb94ca178a97702fe4909dc2d2870789b6387e392bc8a254
Contents?: true
Size: 843 Bytes
Versions: 2
Compression:
Stored size: 843 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
thecore_auth_commons-3.0.6 | config/initializers/after_initialize.rb |
thecore_auth_commons-3.0.5 | config/initializers/after_initialize.rb |