What is the difference when using flash :error, :alert, and :notice?

前端 未结 5 1817
旧巷少年郎
旧巷少年郎 2020-12-25 11:03

As the title of the question asks, I am interested in knowing if there is any difference when using flash[:error], flash[:alert], and flash[:

5条回答
  •  萌比男神i
    2020-12-25 11:40

    They are just different classifications. I mainly use :error and :notice. Notice I use for informational messages ("your password has been changed", "changes saved", etc). I reserve :error for critical things/problems ("Your passwords do not match", "Login failed", etc)

提交回复
热议问题