app/views/layouts/_notifications.html.erb
<div class="notifications_fixed_top">
<% if flash[:warning] %>
<div class='alert pull-left' style="width: 50%">
<button type="button" class="close" data-dismiss="alert">x</button>
<%= flash[:warning] %>
</div>
<% end -%>
<% if flash[:notice] %>
<div class='alert alert-success pull-left' style="width: 50%">
<button type="button" class="close" data-dismiss="alert">x</button>
<%= flash[:notice] %>
</div>
<% end %>
<% if flash[:error] %>
<div class='alert alert-danger pull-left' style="width: 50%">
<button type="button" class="close" data-dismiss="alert">x</button>
<%= flash[:error] %>
</div>
<% end -%>
<% if flash[:custom] %>
<div class='alert pull-left' style="width: 50%">
<button type="button" class="close" data-dismiss="alert">x</button>
<%= flash[:custom] %>
</div>
<% end -%>
<!-- for devise flash -->
<% if alert && !alert.empty? %>
<div class='alert alert-danger pull-left' style="width: 50%">
<button type="button" class="close" data-dismiss="alert">x</button>
<%= flash[:alert] %>
</div>
<% end %>
</div>