stubs/inertia-common/app/controllers/profile_controller.rb in kaze-0.9.0 vs stubs/inertia-common/app/controllers/profile_controller.rb in kaze-0.10.0
- old
+ new
@@ -1,17 +1,20 @@
class ProfileController < ApplicationController
+ skip_ensure_email_is_verified
+
def edit
render inertia: 'Profile/Edit', props: {
- status: session[:status]
+ mustVerifyEmail: User.include?(MustVerifyEmail),
+ status: flash[:status]
}
end
def update
form = UpdateProfileInformationForm.new(params.permit(:name, :email))
return redirect_to profile_edit_path, inertia: { errors: form.error_messages } if form.invalid?
- Current.auth.user.update(name: form.name, email: form.email)
+ form.update
redirect_to profile_edit_path
end
def destroy