mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-06 03:46:39 +08:00
Fixes per @okriuchykhin 's request
This commit is contained in:
parent
5e6a4bb69a
commit
d2ed415a25
1 changed files with 8 additions and 10 deletions
|
@ -161,18 +161,16 @@ class Users::RegistrationsController < Devise::RegistrationsController
|
|||
else
|
||||
render :new
|
||||
end
|
||||
else
|
||||
if valid_resource
|
||||
super do |resource|
|
||||
# Set the confirmed_at == created_at IF not using email confirmations
|
||||
unless Rails.configuration.x.enable_email_confirmations
|
||||
resource.update(confirmed_at: resource.created_at)
|
||||
resource.save
|
||||
end
|
||||
elsif valid_resource
|
||||
super do |resource|
|
||||
# Set the confirmed_at == created_at IF not using email confirmations
|
||||
unless Rails.configuration.x.enable_email_confirmations
|
||||
resource.update(confirmed_at: resource.created_at)
|
||||
resource.save
|
||||
end
|
||||
else
|
||||
render :new
|
||||
end
|
||||
else
|
||||
render :new
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue