app/controllers/symphonia/accounts_controller.rb in symphonia-4.1.0 vs app/controllers/symphonia/accounts_controller.rb in symphonia-4.1.1
- old
+ new
@@ -30,11 +30,11 @@
end
respond_to do |format|
if @user.valid? && verify_registration && @user.save(validate: false)
Notifier.activation_user(@user).deliver_later
Notifier.user_registered(@user).deliver_later
- format.html { redirect_to '/', notice: t(:text_user_registered) }
+ format.html { redirect_to login_path, notice: t(:text_user_registered) }
format.json { render status: :created }
else
format.html { render action: 'register' }
format.json { render json: @user.errors, status: :unprocessable_entity }
end
@@ -69,27 +69,27 @@
def resend_activation
@user = find_account_by_mail(params.require(:email))
if @user
if @user.active?
- redirect_to root_path, flash: { error: t(:text_user_alerady_active) }
+ redirect_to login_path, flash: { error: t(:text_user_alerady_active) }
else
@user.reset_perishable_token!
Notifier.activation_user(@user).deliver_later
- redirect_to root_path, notice: t(:text_activation_resend)
+ redirect_to login_path, notice: t(:text_activation_resend)
end
else
- redirect_to root_path, flash: { error: t(:text_user_not_found) }
+ redirect_to login_path, flash: { error: t(:text_user_not_found) }
end
end
def activation
@user = find_account_by_token(params[:activation_code])
if @user
@user.activate!
redirect_to login_path, notice: t(:text_activation_success)
else
- redirect_to root_path, flash: { error: t(:text_user_not_found_or_token_invalid) }
+ redirect_to login_path, flash: { error: t(:text_user_not_found_or_token_invalid) }
end
end
def current