README.md in gritter-0.6.2 vs README.md in gritter-0.6.3

- old
+ new

@@ -1,8 +1,8 @@ # gritter - version 0.6.2 + version 0.6.3 Robin Brouwer Daniƫl Zwijnenburg 45north This Ruby on Rails gem allows you to easily add Growl-like notifications to your application using a jQuery plugin called 'gritter'. @@ -21,18 +21,18 @@ script/plugin install git://github.com/RobinBrouwer/gritter.git -r 'tag v0.3' ## Rails 3.1 installation -Gritter now also supports Rails 3.1, thanks to [finist](https://github.com/finist]). -Adding the JavaScript en CSS files is accomplished in a different way, because of the new 'assets' folder inside /app. +Gritter now also supports Rails 3.1, thanks to [finist](https://github.com/finist). +Adding the JavaScript and CSS files is accomplished in a different way, because of the new 'assets' folder inside /app. -Add the following to /app/assets/javascripts/application.js: +Add the following to `/app/assets/javascripts/application.js`: //= require gritter -And the following to /app/assets/stylesheets/application.css: +And the following to `/app/assets/stylesheets/application.css`: *= require gritter And that's it! It now works with Rails 3.1. No need to add `include_gritter` to your layout. @@ -65,10 +65,15 @@ You should really check out the gflash helper. It's really handy! ## Changes +Version 0.6.3 changes: + + - Calling gflash multiple times won't override older messages. + - You can set the time, sticky and class_name per gflash message. + Version 0.6.2 changes: - Reduced the size of all images; - Also works with Rails 3.1. @@ -234,9 +239,15 @@ And that's how you add gflash to your Rails application. Just remember that you can only set which gflash message you want shown inside the controller. The gflash helper inside the views will show the notification and change the title when you pass extra arguments. It will not change the message. + +Since 0.6.3 you can change the default time, sticky and class_name options for each gflash message. +This is done inside the Controller and works like this: + + gflash :success => { :value => true, :time => 2000, :class_name => "my_class", :sticky => true } + gflash :error => { :value => "Custom error", :time => 3000, :class_name => "my_error_class", :sticky => false } ## Special Thanks We'd like to express our gratitude to the following people: \ No newline at end of file