README.rdoc in cacheable_flash-0.2.1 vs README.rdoc in cacheable_flash-0.2.2
- old
+ new
@@ -20,20 +20,26 @@
== Setup
=== Without asset pipeline, or pre-Rails 3.1:
-rails generate cacheable_flash:install
+First copy the JS assets into your app:
+ rails generate cacheable_flash:install
-In your layout:
-javascript_include_tag 'flash', 'jquery.cookie'
+CacheableFlash adds its javascript dependencies as a Rails 3 javascript 'expansion',
+which are only used if you are NOT using the asset pipeline (apparently?).
+So if you have config.assets.enabled = false in application.rb then in your layout:
+ javascript_include_tag :cacheable_flash
+
+Otherwise, in your layout, just source them like normal:
+ javascript_include_tag 'flash', 'jquery.cookie'
+
=== With asset pipeline (requires Rails 3.1)
The asset pipeline should have access to the assets in this gem via your app/assets/application.js:
-
-//= require flash
-//= require jquery.cookie
+ //= require flash
+ //= require jquery.cookie
== Description
This plugin enables greater levels of page caching by rendering flash
messages from a cookie using JavaScript, instead of in your Rails