Make use of ENV.fetch
This commit is contained in:
parent
200d188af2
commit
36b23ce25d
27 changed files with 51 additions and 53 deletions
|
|
@ -51,7 +51,7 @@ class User < ApplicationRecord
|
|||
# :lockable, :timeoutable and :omniauthable
|
||||
devise_modules = []
|
||||
|
||||
devise_modules += if ENV['OSEM_ICHAIN_ENABLED'] == 'true'
|
||||
devise_modules += if ENV.fetch('OSEM_ICHAIN_ENABLED', nil) == 'true'
|
||||
[:ichain_authenticatable, :ichain_registerable, :omniauthable, omniauth_providers: []]
|
||||
else
|
||||
[:database_authenticatable, :registerable,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue