Flajax
Description
Gem that provides ajax flash messages for you rails app.
Installation
Add flajax to your gemfile
gem flajax
To get flajax working you should replace your messages partial with the one that flajax provides. You can customize this partial as much as you want and use it in your layout just make sure to preserve 4 containers with the following clases: x-flash-error, x-flash-warning, x-flash-notice and x-flash-mesagge with span.text inside so that flajax can find a place to insert the text.
you can generate the partial with the following command:
$ rails g flajax_partial
Make sure to render this partial!
Flajax also needs some js to work. In app/assets/javascript/application.js add:
//= require flajax
And thats it … now you are able to flash in post/get ajax requests.