Skip to content

Commit e4140cc

Browse files
app-rails: Update template-application-rails to version 0.4.1.post18.dev0+76bb6f5
1 parent f77850a commit e4140cc

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: v0.4.1-16-gbdd839a
2+
_commit: v0.4.1-18-g76bb6f5
33
_src_path: https://github.com/navapbc/template-application-rails
44
app_local_port: 3100
55
app_name: app-rails

app-rails/app/controllers/users/accounts_controller.rb

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
class Users::AccountsController < ApplicationController
44
before_action :authenticate_user!
5+
before_action :set_password_form
56
skip_after_action :verify_authorized
67

78
def edit
89
@email_form = Users::UpdateEmailForm.new({ email: current_user.email })
9-
@password_form = Users::ForgotPasswordForm.new({ email: current_user.email })
1010
end
1111

1212
def update_email
@@ -28,11 +28,16 @@ def update_email
2828
end
2929

3030
private
31-
def auth_service
32-
AuthService.new
33-
end
3431

35-
def user_email_params
36-
params.require(:users_update_email_form).permit(:email)
37-
end
32+
def set_password_form
33+
@password_form = Users::ForgotPasswordForm.new({ email: current_user.email })
34+
end
35+
36+
def auth_service
37+
AuthService.new
38+
end
39+
40+
def user_email_params
41+
params.require(:users_update_email_form).permit(:email)
42+
end
3843
end

0 commit comments

Comments
 (0)