You can use this jQuery plugin to simulate the effect. Just wrap JS in a conditional expression that checks for a flash (or session / db if you want a persistent message)
<% if flash[:notice] or session[:notice] or current_user.notifications %>
$(function () {
$.notifyBar({
html: "<%= flash[:notice] %>",
delay: 2000,
animationSpeed: "normal"
});
});
<% end %>
You will need to style it, obviously.
source
share