Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
rzane committed Apr 9, 2024
1 parent 9ca300f commit e7095b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,16 @@ Betterment/HardcodedID:

### Betterment/RedirectStatus

Rails `redirect_to` defaults to a `302 Found` redirect, but when redirecting a POST/PUT/PATCH/DELETE
to a GET location, the correct response code is `303 See Other`:
Rails `redirect_to` defaults to a `302 Found`, but when redirecting a POST/PUT/PATCH/DELETE
to a GET location, the correct response code is `303 See Other`.

> Many web browsers implemented this code in a manner that violated this standard, changing the request
> type of the new request to GET, regardless of the type employed in the original request (e.g. POST).
> For this reason, HTTP/1.1 (RFC 2616) added the new status codes 303 and 307 to disambiguate between
> the two behaviours, with 303 mandating the change of request type to GET, and 307 preserving the
> request type as originally sent.
> -- https://en.wikipedia.org/wiki/HTTP_302
>
> — https://en.wikipedia.org/wiki/HTTP_302

This cop requires you to explictly provide an HTTP status code when redirecting from the create,
update, and destory actions. When autocorrecting, this will automatically add `status: :see_other`.
Expand Down
2 changes: 1 addition & 1 deletion betterlint.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

Gem::Specification.new do |s|
s.name = "betterlint"
s.version = "1.9.0"
s.version = "1.10.0"
s.authors = ["Development"]
s.email = ["development@betterment.com"]
s.summary = "Betterment rubocop configuration"
Expand Down

0 comments on commit e7095b3

Please sign in to comment.