We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Rails/HttpStatus
head
This request is for an enhancement of the actual Rails/HttpStatus cop. Indeed, current cop detects render and redirect_to but not head.
render
redirect_to
I would like the cop to detect an offense when rendering HTTP status using head keyword.
def my_action head 200 # should flag an offense and ask to replace with :ok end
No alternative
$ rubocop -V 1.14.0 (using Parser 3.0.1.1, rubocop-ast 1.5.0, running on ruby 2.6.6 x86_64-darwin20) - rubocop-performance 1.11.3 - rubocop-rails 2.10.1 - rubocop-rspec 2.3.0
The text was updated successfully, but these errors were encountered:
[Fix rubocop#490] Make Rails/HttpStatus aware of head method
210b4ad
Fixes rubocop#490. This PR makes `Rails/HttpStatus` aware of `head` method.
df290bd
af973f2
Merge pull request #493 from koic/make_rails_http_status_aware_of_hea…
cc15766
…d_method [Fix #490] Make `Rails/HttpStatus` aware of `head` method
Successfully merging a pull request may close this issue.
Is your feature request related to a problem? Please describe.
This request is for an enhancement of the actual Rails/HttpStatus cop.
Indeed, current cop detects
render
andredirect_to
but nothead
.Describe the solution you'd like
I would like the cop to detect an offense when rendering HTTP status using
head
keyword.Describe alternatives you've considered
No alternative
Additional context
The text was updated successfully, but these errors were encountered: