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
When flash is set in a case statement, followed by a redirect_to, the cop should not register an offense.
Actual behavior
Offenses:
app/controllers/context_controller.rb:262:11: C: Rails/ActionControllerFlashBeforeRender: Use flash.now before render.
flash[:error] = t("no_user.course", "That user does not exist or is not currently a member of this course")
^^^^^
app/controllers/context_controller.rb:264:11: C: Rails/ActionControllerFlashBeforeRender: Use flash.now before render.
flash[:error] = t("no_user.group", "That user does not exist or is not currently a member of this group")
^^^^^
Steps to reproduce the problem
unless@usercase@contextwhenCourseflash[:error]=t("no_user.course","That user does not exist or is not currently a member of this course")whenGroupflash[:error]=t("no_user.group","That user does not exist or is not currently a member of this group")endredirect_tonamed_context_url(@context,:context_users_url)returnend
Expected behavior
When
flash
is set in a case statement, followed by aredirect_to
, the cop should not register an offense.Actual behavior
Steps to reproduce the problem
RuboCop version
The text was updated successfully, but these errors were encountered: