Skip to content

Commit 2665855

Browse files
committed
Fix unprocessable entity deprecation warning
I'm seeing this deprecation when using newer versions of `rack` with request specs that use the `rspec-rails` `have_http_status` matcher [1]. Status code :unprocessable_entity is deprecated and will be removed in a future version of Rack. Please use :unprocessable_content instead. The `:unprocessable_entity` symbol was deprecated in `rack` in this commit [2] which was released in `rack` v3.1.0 [3]. [1]: https://rspec.info/features/8-0/rspec-rails/matchers/have-http-status-matcher/ [2]: rack/rack#2137 [3]: https://github.com/rack/rack/blob/ee7ac5a1db5bc5c65e4b83342b8f4df88ef3c075/CHANGELOG.md#310---2024-06-11
1 parent dd3ce76 commit 2665855

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/controllers/administrate/application_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def create
5454
else
5555
render :new, locals: {
5656
page: Administrate::Page::Form.new(dashboard, resource)
57-
}, status: :unprocessable_entity
57+
}, status: :unprocessable_content
5858
end
5959
end
6060

@@ -68,7 +68,7 @@ def update
6868
else
6969
render :edit, locals: {
7070
page: Administrate::Page::Form.new(dashboard, requested_resource)
71-
}, status: :unprocessable_entity
71+
}, status: :unprocessable_content
7272
end
7373
end
7474

0 commit comments

Comments
 (0)