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
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.
Inspecting 1 file C Offenses: app/controllers/users_controller.rb:54:5: C: [Correctable] Rails/ActionControllerFlashBeforeRender: Use flash.now before render. flash[:notice] = t(".notice")
Steps to reproduce the problem
RuboCop version
The text was updated successfully, but these errors were encountered: