Fixes per @okriuchykhin 's request

This commit is contained in:
zmagod 2017-10-26 10:42:18 +02:00
parent 5e6a4bb69a
commit d2ed415a25

View file

@ -161,18 +161,16 @@ class Users::RegistrationsController < Devise::RegistrationsController
else else
render :new render :new
end end
else elsif valid_resource
if valid_resource super do |resource|
super do |resource| # Set the confirmed_at == created_at IF not using email confirmations
# Set the confirmed_at == created_at IF not using email confirmations unless Rails.configuration.x.enable_email_confirmations
unless Rails.configuration.x.enable_email_confirmations resource.update(confirmed_at: resource.created_at)
resource.update(confirmed_at: resource.created_at) resource.save
resource.save
end
end end
else
render :new
end end
else
render :new
end end
end end