Module: Adminlock
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/adminlock.rb,
lib/adminlock/engine.rb,
app/helper/adminlock/adminlock_helper.rb,
app/helper/adminlock/application_helper.rb,
app/controllers/adminlock/adminlock_controller.rb,
app/controllers/adminlock/application_controller.rb
Defined Under Namespace
Modules: AdminlockHelper, ApplicationHelper Classes: AdminlockController, ApplicationController, Engine
Class Method Summary collapse
Class Method Details
.from_config(setting, secrets_or_credentials = :credentials) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/adminlock.rb', line 14 def self.from_config(setting, secrets_or_credentials = :credentials) return unless Rails.application.respond_to?(secrets_or_credentials) store = Rails.application.public_send(secrets_or_credentials) store.adminlock.respond_to?(:fetch) && store.adminlock.fetch(setting, store.public_send("adminlock_#{setting}")) || store.public_send("adminlock_#{setting}") || store.public_send(setting) end |