stubs/hotwire/app/controllers/profile_controller.rb in kaze-0.9.0 vs stubs/hotwire/app/controllers/profile_controller.rb in kaze-0.10.0
- old
+ new
@@ -1,6 +1,8 @@
class ProfileController < ApplicationController
+ skip_ensure_email_is_verified
+
def edit
@update_profile_information_form = UpdateProfileInformationForm.new(name: Current.auth.user.name, email: Current.auth.user.email)
@update_password_form = UpdatePasswordForm.new
@delete_user_form = DeleteUserForm.new
@@ -10,10 +12,10 @@
def update
@update_profile_information_form = UpdateProfileInformationForm.new(params.permit(:name, :email))
return render partial: 'profile/partials/update_profile_information_form', status: :unprocessable_entity if @update_profile_information_form.invalid?
- Current.auth.user.update(name: @update_profile_information_form.name, email: @update_profile_information_form.email)
+ @update_profile_information_form.update
redirect_to profile_edit_path, flash: { status: 'profile-updated' }
end
def destroy