i've been trying to work this out myself and not have to ask but I can't seem to find a solution.
I have a flash notice working perfectly in my app: application.html.erb excerpt:
<body>
<div class="container">
<% flash.each do |key, value| %>
<%= content_tag :div, value, class: "alert alert-#{key}" %>
<% end %>
<%= yield %>
</div>
</body>
..my question is, is there a way of adding the 'close' bootstrap feature within the above code?..
i.e:
<div class="alert alert-warning alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
..but including it within my <%= %>
(it obviously doesn't need to be the 'warning' class as above, this was just copied from bootstrap as an example)
Thanks in advance!!
Justin
@MattBricston ..i'm struggling to grasp the key == :notice ? 'success' : 'danger' line, would it only work for 'success', and 'danger' bootstrap alerts?..is it just a matter or adding : 'warning' : 'info' etc??...
Thanks again, really appreciate it :)