stubs/hotwire/app/controllers/profile_controller.rb in kaze-0.13.0 vs stubs/hotwire/app/controllers/profile_controller.rb in kaze-0.14.0

- old
+ new

@@ -14,16 +14,16 @@ return render partial: 'profile/partials/update_profile_information_form', status: :unprocessable_entity if @update_profile_information_form.invalid? @update_profile_information_form.update - redirect_to profile_edit_path, flash: { status: 'profile-updated' } + redirect_back_or_to profile_edit_path, flash: { status: 'profile-updated' } end def destroy @delete_user_form = DeleteUserForm.new(params.permit(:password)) - return render turbo_stream: turbo_stream.replace('confirm_user_deletion_modal', partial: 'profile/partials/confirm_user_deletion_modal'), status: :unprocessable_entity if @delete_user_form.invalid? + return turbo_stream if @delete_user_form.invalid? user = Current.auth.user Current.auth.logout