Fix Style/ConditionalAssignment errors

They did not get excluded by `--auto-gen-config`
This commit is contained in:
Hernan Schmidt 2017-07-14 14:12:54 +02:00 committed by Hernán Schmidt
parent 523203ac74
commit d9a3b0de72
5 changed files with 31 additions and 31 deletions

View file

@ -30,13 +30,13 @@ class User < ActiveRecord::Base
# :lockable, :timeoutable and :omniauthable
devise_modules = []
if ENV['OSEM_ICHAIN_ENABLED'] == 'true'
devise_modules += [:ichain_authenticatable, :ichain_registerable, :omniauthable, omniauth_providers: []]
else
devise_modules += [:database_authenticatable, :registerable,
devise_modules += if ENV['OSEM_ICHAIN_ENABLED'] == 'true'
[:ichain_authenticatable, :ichain_registerable, :omniauthable, omniauth_providers: []]
else
[:database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable, :confirmable,
:omniauthable, omniauth_providers: [:suse, :google, :facebook, :github]]
end
end
devise(*devise_modules)