Error popup only shows on flash[:error]
This commit is contained in:
1 parent
39604d30ce
commit
43bc704468
3 files changed
+5
-7
No files matched your search
@@ -13,12 +13,10 @@
|
||||
</head>
|
||||
<body>
|
||||
<%= yield %>
|
||||
<% if !flash.empty? %>
|
||||
<% if flash[:error] %>
|
||||
<div class="modal alert alert-error hide" id="myModal">
|
||||
<p type="button" class="close" data-dismiss="modal">×</p>
|
||||
<% flash.each do |key, msg| %>
|
||||
<%= "<strong>#{msg}</strong><br/>".html_safe%>
|
||||
<% end%>
|
||||
<%= "<strong>#{flash[:error]}</strong><br/>".html_safe%>
|
||||
</div>
|
||||
<script>
|
||||
$('#myModal').modal('show')
|
||||
|
||||
Reference in new issue
Block a user