Closed ildarkayumov closed 1 month ago
May be fixed by this revert - https://github.com/rubocop/rubocop-rails/pull/1344 - but is not released yet.
I plan to release a bug fix version within the next couple of days. Please wait a little longer
The PR will not fix this. There is simply no way for rubocop to handle this properly; it is just static analysis. You are probably better of disabling it if this is a common pattern for you.
Expected behavior
When redirect_to is called in controller action and flash is set in different extracted method, the cop should not show any offense.
Actual behavior
Even if methods are very simple implementation, a violation is raised.
Steps to reproduce the problem
RuboCop version