You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixesrubocop#822.
This PR extends `Rails/HttpStatus` to detects offenses in `routes.rb` on redirections:
```ruby
Rails.application.routes.draw do
get '/foobar', to: redirect('/foobar/baz', status: 301)
end
```
anthony-robin
pushed a commit
to anthony-robin/rubocop-rails
that referenced
this issue
Oct 21, 2022
Fixesrubocop#822.
This PR extends `Rails/HttpStatus` to detects offenses in `routes.rb` on redirections:
```ruby
Rails.application.routes.draw do
get '/foobar', to: redirect('/foobar/baz', status: 301)
end
```
Is your feature request related to a problem? Please describe.
Currently, the
Rails/HttpStatus
cop detects offenses in controllers but not inroutes.rb
.Describe the solution you'd like
It could be interesting to extends
Rails/HttpStatus
to detect offenses inredirect
method as well.Thank you :)
The text was updated successfully, but these errors were encountered: