README.md in bootstrap_flash_messages-0.0.1 vs README.md in bootstrap_flash_messages-0.0.2
- old
+ new
@@ -1,8 +1,8 @@
# bootstrap_flash_messages
- version 0.0.1
+ version 0.0.2
Robin Brouwer
45north
Bootstrap alerts and Rails flash messages combined in one easy-to-use gem.
@@ -20,10 +20,14 @@
And that's it!
## Changes
+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):
- Changed redirect_to method
- Added flash! and flash_now! methods
- Added flash_messages helper
@@ -64,11 +68,11 @@
render("new")
end
end
end
-You can use the `:flash` parameter inside the `redirect_to` method (note: this gem changes the redirect_to method!) to set the flash messages. You only need to pass the corresponding key and the gem will automatically set `gflash[:success]` to `t("flash_messages.posts.create.success")`. The `:flash` parameter also accepts an Array.
+You can use the `:flash` parameter inside the `redirect_to` method (note: this gem changes the redirect_to method!) to set the flash messages. You only need to pass the corresponding key and the gem will automatically set `flash[:success]` to `t("flash_messages.posts.create.success")`. The `:flash` parameter also accepts an Array.
redirect_to(@post, :flash => [:success, :info])
You can still use a Hash to use the default `redirect_to` behavior. When you don't want to use the `redirect_to` method to set the flash messages, you can use the `flash!` method.
@@ -87,18 +91,18 @@
And that's it! To change the flash messages inside a `.js.erb` file, you can do the following:
$("#flash_messages").html("#{j(flash_messages)}");
-The `flash_messages` helper shows a simple Bootstrap alert box. If you want to add a close button you can add the :close option.
+The `flash_messages` helper shows a simple Bootstrap alert box. If you want to add a close button you can add the `:close` option.
<%= flash_messages(:close) %>
-Want to use the `.alert-block` class? Just add :block.
+Want to use the `.alert-block` class? Just add `:block`.
<%= flash_messages(:close, :block) %>
-Want a heading? Add :heading. The headings inside flash.en.yml are used.
+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. :)
\ No newline at end of file