In Rails, flash.now should never end up with redirect_to, and flash (without .now) should normally not end up at "render". However, it's not that hard to make that mistake, especially after making other changes. I think it'd be useful for rails_best_practices to detect that case.
Here's an enhancement idea.
In Rails, flash.now should never end up with redirect_to, and flash (without .now) should normally not end up at "render". However, it's not that hard to make that mistake, especially after making other changes. I think it'd be useful for rails_best_practices to detect that case.
E.g., detect misuses like this: