Reputation: 5005
<div class="alert-message notice fade in">
<strong>Product was successfully updated.</strong>
</div>
<p id="notice">Product was successfully updated.</p>
Why is this getting printed out twice?
applicaiton.html.erb
<%= render 'layouts/errors'%>
layouts/errors
<% flash.each do |key, value| %>
<div class="alert-message <%= key %> fade in">
<a class="close" href="#">×</a>
<center><strong><%= value %></strong></center>
</div>
<% end %>
Upvotes: 0
Views: 364
Reputation: 5096
I'm not sure I understand what you are saying. It looks like it is correct to me, you have a <div>
with a <strong>
in it, and a <p>
with the same message in it.
If you want the second one to not be printed, remove it.
Upvotes: 1