How do I display flash messages when using the clearance
gem for user authentication?
I have this code set in my view/layouts/application.html.erb
inside the body tags:
<% flash.each do |key, value| %>
<div class="alert alert-<%= key %>"><%= value %></div>
<% end %>
I have checked the docs and wiki but couldn't find anything. When I create a user or login/logout there is no flash message displayed.
清除不会显示用于登录或注销的成功闪烁,因为这些操作的成功不被认为是值得关注且值得警惕的。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.