-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
Rails/ActionControllerFlashBeforeRender reports false positives with if/else and redirect_to #825
Labels
bug
Something isn't working
Comments
9 tasks
We're seeing the same issue when we use |
9 tasks
koic
added a commit
to koic/rubocop-rails
that referenced
this issue
Oct 26, 2022
…shBeforeRender` Fixes rubocop#825. This PR fixes a false positive for `Rails/ActionControllerFlashBeforeRender` when using condition before `redirect_to`.
koic
added a commit
to koic/rubocop-rails
that referenced
this issue
Oct 26, 2022
…shBeforeRender` Fixes rubocop#825. This PR fixes a false positive for `Rails/ActionControllerFlashBeforeRender` when using condition before `redirect_to`.
koic
added a commit
to koic/rubocop-rails
that referenced
this issue
Oct 26, 2022
…shBeforeRender` Fixes rubocop#825. This PR fixes a false positive for `Rails/ActionControllerFlashBeforeRender` when using condition before `redirect_to`.
koic
added a commit
that referenced
this issue
Oct 26, 2022
…on_controller_flash_before_render [Fix #825] Fix a false positive for `Rails/ActionControllerFlashBeforeRender`
Hi, I've tested 2.17.2 but there are still false positives. As far as I can tell, some of them are not easy to detect and also providing a reduced test case is tricky I've started with #843 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
RuboCop reports a false positive with if/else and
redirect_to
Follow up from #812 (comment)
Expected behavior
Rubocop does not report errors
Actual behavior
Steps to reproduce the problem
pages_controller.rb
filerubocop --require rubocop-rails --only Rails/ActionControllerFlashBeforeRender pages_controller.rb
RuboCop version
Also tested against rubocop-rails main
The text was updated successfully, but these errors were encountered: