Browse Source

Add flash rendering

Frans Bergman 7 năm trước cách đây
mục cha
commit
8bd819c136
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      app/views/layouts/application.html.erb

+ 3 - 0
app/views/layouts/application.html.erb

@@ -18,6 +18,9 @@
           <div class="container-fluid">
               <div class="row">
                   <div class="col-lg-12">
+                    <% flash.each do |message_type, message| %>
+                      <div class="alert alert-<%= message_type %>"><%= message %></div>
+                    <% end %>
                     <%= yield %>
                     <%= debug(params) if Rails.env.development? %>
                   </div>