Devise/Rails - How to remove a particular flash message? (Signed in Successfully)

前端 未结 8 892
囚心锁ツ
囚心锁ツ 2020-12-13 12:38

Using Devise, I would like to know if there is a way to remove a particular flash message? (Signed in Successfully).

I care about other msg in the view, so It is jus

相关标签:
8条回答
  • 2020-12-13 13:28

    You just define it to an empty string in your local file. In this case you can see nothing.

    0 讨论(0)
  • 2020-12-13 13:28

    You can do this, Kindly change the condition type and flash type accordingly.

    flash.delete(:alert) if flash[:alert] == "You need to sign in or sign up before continuing." @drivers = params[:keyword].blank? ? [] : Driver.find(params[:keyword])

    You can do it in before filter.

    0 讨论(0)
提交回复
热议问题