Skip to content

Commit 7519e2b

Browse files
app-rails: Update template-application-rails to version 0.4.1.post15.dev0+feddafa
1 parent 144b0f3 commit 7519e2b

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
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-14-g36436fd
2+
_commit: v0.4.1-15-gfeddafa
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ def update_email
1414

1515
if @email_form.invalid?
1616
flash.now[:errors] = @email_form.errors.full_messages
17-
return render :edit, status: :unprocessable_entity
17+
return render :edit, status: :unprocessable_content
1818
end
1919

2020
begin
2121
auth_service.change_email(current_user.uid, @email_form.email)
2222
rescue Auth::Errors::BaseAuthError => e
2323
flash.now[:errors] = [ e.message ]
24-
return render :edit, status: :unprocessable_entity
24+
return render :edit, status: :unprocessable_content
2525
end
2626

2727
redirect_to({ action: :edit }, notice: "Account updated successfully.")

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def update_preference
1515

1616
if @form.invalid?
1717
flash.now[:errors] = @form.errors.full_messages
18-
return render :preference, status: :unprocessable_entity
18+
return render :preference, status: :unprocessable_content
1919
end
2020

2121
if @form.mfa_preference == "software_token"

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ def send_reset_password_instructions
1414

1515
if @form.invalid?
1616
flash.now[:errors] = @form.errors.full_messages
17-
return render :forgot, status: :unprocessable_entity
17+
return render :forgot, status: :unprocessable_content
1818
end
1919

2020
begin
2121
auth_service.forgot_password(email)
2222
rescue Auth::Errors::BaseAuthError => e
2323
flash.now[:errors] = [ e.message ]
24-
return render :forgot, status: :unprocessable_entity
24+
return render :forgot, status: :unprocessable_content
2525
end
2626

2727
redirect_to users_reset_password_path
@@ -36,7 +36,7 @@ def confirm_reset
3636

3737
if @form.invalid?
3838
flash.now[:errors] = @form.errors.full_messages
39-
return render :reset, status: :unprocessable_entity
39+
return render :reset, status: :unprocessable_content
4040
end
4141

4242
begin
@@ -47,7 +47,7 @@ def confirm_reset
4747
)
4848
rescue Auth::Errors::BaseAuthError => e
4949
flash.now[:errors] = [ e.message ]
50-
return render :reset, status: :unprocessable_entity
50+
return render :reset, status: :unprocessable_content
5151
end
5252

5353
redirect_to new_user_session_path, notice: I18n.t("users.passwords.reset.success")

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ def create
1616

1717
if @form.invalid?
1818
flash.now[:errors] = @form.errors.full_messages
19-
return render :new, status: :unprocessable_entity
19+
return render :new, status: :unprocessable_content
2020
end
2121

2222
begin
2323
auth_service.register(@form.email, @form.password)
2424
rescue Auth::Errors::BaseAuthError => e
2525
flash.now[:errors] = [ e.message ]
26-
return render :new, status: :unprocessable_entity
26+
return render :new, status: :unprocessable_content
2727
end
2828

2929
redirect_to users_verify_account_path
@@ -40,14 +40,14 @@ def create_account_verification
4040

4141
if @form.invalid?
4242
flash.now[:errors] = @form.errors.full_messages
43-
return render :new_account_verification, status: :unprocessable_entity
43+
return render :new_account_verification, status: :unprocessable_content
4444
end
4545

4646
begin
4747
auth_service.verify_account(@form.email, @form.code)
4848
rescue Auth::Errors::BaseAuthError => e
4949
flash.now[:errors] = [ e.message ]
50-
return render :new_account_verification, status: :unprocessable_entity
50+
return render :new_account_verification, status: :unprocessable_content
5151
end
5252

5353
redirect_to new_user_session_path
@@ -59,7 +59,7 @@ def resend_verification_code
5959

6060
if @resend_verification_form.invalid?
6161
flash.now[:errors] = @resend_verification_form.errors.full_messages
62-
return render :new_account_verification, status: :unprocessable_entity
62+
return render :new_account_verification, status: :unprocessable_content
6363
end
6464

6565
auth_service.resend_verification_code(email)

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def create
1313

1414
if @form.invalid?
1515
flash.now[:errors] = @form.errors.full_messages
16-
return render :new, status: :unprocessable_entity
16+
return render :new, status: :unprocessable_content
1717
end
1818

1919
begin
@@ -25,7 +25,7 @@ def create
2525
return redirect_to users_verify_account_path
2626
rescue Auth::Errors::BaseAuthError => e
2727
flash.now[:errors] = [ e.message ]
28-
return render :new, status: :unprocessable_entity
28+
return render :new, status: :unprocessable_content
2929
end
3030

3131
unless response[:user].present?
@@ -53,7 +53,7 @@ def respond_to_challenge
5353

5454
if @form.invalid?
5555
flash.now[:errors] = @form.errors.full_messages
56-
return render :challenge, status: :unprocessable_entity
56+
return render :challenge, status: :unprocessable_content
5757
end
5858

5959
begin
@@ -65,12 +65,12 @@ def respond_to_challenge
6565
)
6666
rescue Auth::Errors::BaseAuthError => e
6767
flash.now[:errors] = [ e.message ]
68-
return render :challenge, status: :unprocessable_entity
68+
return render :challenge, status: :unprocessable_content
6969
end
7070

7171
unless response[:user].present?
7272
flash.now[:errors] = [ "Invalid code" ]
73-
return render :challenge, status: :unprocessable_entity
73+
return render :challenge, status: :unprocessable_content
7474
end
7575

7676
session[:challenge_session] = nil

app-rails/config/initializers/devise.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
# apps is `200 OK` and `302 Found` respectively, but new apps are generated with
3232
# these new defaults that match Hotwire/Turbo behavior.
3333
# Note: These might become the new default in future versions of Devise.
34-
config.responder.error_status = :unprocessable_entity
34+
config.responder.error_status = :unprocessable_content
3535
config.responder.redirect_status = :see_other
3636

3737
# ==> ORM configuration

0 commit comments

Comments
 (0)