mirror of
https://github.com/internetee/registry.git
synced 2025-08-01 23:42:04 +02:00
fixed codeclimate errors
This commit is contained in:
parent
e0c47cdb35
commit
788af6cc5f
15 changed files with 32 additions and 31 deletions
|
@ -35,15 +35,13 @@ class Registrar
|
|||
@depp_user.errors.add(:base, :invalid_cert)
|
||||
end
|
||||
|
||||
if @depp_user.errors.none?
|
||||
if @api_user.active?
|
||||
sign_in_and_redirect(:registrar_user, @api_user)
|
||||
else
|
||||
@depp_user.errors.add(:base, :not_active)
|
||||
show_error and return
|
||||
end
|
||||
show_error and return unless @depp_user.errors.none?
|
||||
|
||||
if @api_user.active?
|
||||
sign_in_and_redirect(:registrar_user, @api_user)
|
||||
else
|
||||
show_error and return
|
||||
@depp_user.errors.add(:base, :not_active)
|
||||
show_error
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue