Skip to content
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

Follow up fix for positive for Rails/ActionControllerFlashBeforeRender in rescue block #881

Conversation

gurix
Copy link
Contributor

@gurix gurix commented Dec 5, 2022

This PR fixes a false positive for Rails/ActionControllerFlashBeforeRender when using flash in multiline begin...rescue branch before redirect_to.

I ran into the same situation as #844 but within the begin ... rescue branch.


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.
  • If this is a new cop, consider making a corresponding update to the Rails Style Guide.

@koic
Copy link
Member

koic commented Dec 7, 2022

@gurix This looks good to me. Can you refactor with the above review comment and squash your commits into one?

@gurix gurix force-pushed the fix/false_positive_for_rails_action_controller_flash_before_render_with_begin branch from 14437b5 to e730348 Compare December 12, 2022 14:45
Co-Authored-By: Koichi ITO <koic.ito@gmail.com>
@gurix gurix force-pushed the fix/false_positive_for_rails_action_controller_flash_before_render_with_begin branch from e730348 to cb2de46 Compare December 12, 2022 14:49
@koic koic merged commit f8153ca into rubocop:master Dec 12, 2022
@koic
Copy link
Member

koic commented Dec 12, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants