The following code displays Rails flash messages using Bootstrap 3.0:
<%# Rails flash messages styled for Twitter Bootstrap 3.0 %>
<% flash.each do |name, msg| %>
<% if msg.is_a?(String) %>
<div class="alert alert-<%= name == :notice ? "success" : "danger" %>">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<%= content_tag :div, msg, :id => "flash_#{name}" %>
</div>
<% end %>
<% end %>
The code is from the article Bootstrap and Rails.
Similar code from the article Foundation and Rails can be used with Foundation:
<%# Rails flash messages styled for Zurb Foundation 5.0 %>
<% flash.each do |name, msg| %>
<% if msg.is_a?(String) %>
<div data-alert class="alert-box round <%= name == :notice ? "success" : "alert" %>">
<%= content_tag :div, msg %>
<a href="#" class="close">×</a>
</div>
<% end %>
<% end %>
For either Bootstrap or Foundation, when I upgrade my application from Rails 4.0 to Rails 4.1, all flash messages appear in red, even "notice" messages which should appear in green.
What's changed in Rails 4.1 to break this code?