README.md in bootstrap_flash_messages-0.0.2 vs README.md in bootstrap_flash_messages-0.0.3

- old
+ new

@@ -20,10 +20,14 @@ And that's it! ## Changes +Version 0.0.3 changes (14/08/2012): + + - Added interpolation to the flash messages + Version 0.0.2 changes (10/08/2012): - Changed the 'x' in close to & t i m e s ; Version 0.0.1 changes (08/08/2012): @@ -104,9 +108,22 @@ Want a heading? Add `:heading`. The headings inside flash.en.yml are used for the headings. <%= flash_messages(:close, :block, :heading) %> And that's it! Have fun. :) + +## Interpolation + +You can use i18n interpolation like this: + + redirect_to :root, :flash => [:success, :info], :locals => { :name => @user.name, :email => @user.email } + flash! :success, :info, :locals => { :name => @user.name, :email => @user.email } + flash_now! :success, :info, :locals => { :name => @user.name, :email => @user.email } + +Inside `flash.en.yml` you can do the following: + + success: "Welcome, %{name}." + info: "Your e-mail address has been changed to: %{email}." ## Why I created this gem I created the [gritter gem](https://github.com/RobinBrouwer/gritter) and used it in a lot of projects. \ No newline at end of file