-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Use :unprocessable_content in generated Devise config for Rack 3.1+
#5797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
ed625a8
e7f5596
9ac7f53
9fa4d63
f8b8092
3d3e75b
9932bc5
8c0c9a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,8 +27,8 @@ def show | |
| set_flash_message!(:notice, :confirmed) | ||
| respond_with_navigational(resource){ redirect_to after_confirmation_path_for(resource_name, resource) } | ||
| else | ||
| # TODO: use `error_status` when the default changes to `:unprocessable_entity`. | ||
| respond_with_navigational(resource.errors, status: :unprocessable_entity){ render :new } | ||
| # Use `error_status` when the default changes to `:unprocessable_content` (or `:unprocessable_entity`). | ||
| respond_with_navigational(resource.errors, status: (Devise.responder.error_status != :ok) ? Devise.responder.error_status : Rack::Utils::SYMBOL_TO_STATUS_CODE.key(422) ){ render :new } | ||
|
||
| end | ||
| end | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍