False positive for ActionControllerFlashBeforeRender
when flash
is called in a block
#1182
Labels
bug
Something isn't working
When
flash
is called inside a block, a violation ofRails/ActionControllerFlashBeforeRender
is thrown even when the action callsredirect_to
.Expected behavior
A violation should not occur when a redirect is being performed
Actual behavior
Even in a clean action (i.e. no control flow where sometimes it renders and sometimes it redirects), a violation is raised.
Steps to reproduce the problem
This action is reported as violating the rule:
The same problem occurs when called in a multi-line block:
The issue does not occur if you assign the array directly to flash:
RuboCop version
The text was updated successfully, but these errors were encountered: