README.md in handlebars_assets-0.1.3 vs README.md in handlebars_assets-0.1.4
- old
+ new
@@ -6,14 +6,15 @@
Yea, I think so too. That is why I wrote **handlebars_assets**. Give your Handlebars templates their own files (including partials) and have them compiled, compressed, and cached as part of the Rails 3.1 asset pipeline!
## Installation
-Load `handlebars_assets` and `execjs` in your `Gemfile`
+Load `handlebars_assets` in your `Gemfile` as part of the `assets` group
- gem 'handlebars_assets'
- gem 'execjs'
+ group :assets do
+ gem 'handlebars_assets'
+ end
Require `handlebars.vm.js` in your Javascript manifest (i.e. `application.js`)
//= require handlebars.vm
@@ -21,13 +22,19 @@
//= require handlebars
# Compiling your Javascript templates in the asset pipeline
+## Precompiling
+
+`handlebars_assets` also works when you are precompiling your assets. If you are deploying to Heroku, be sure to read the [Rails guide](http://guides.rubyonrails.org/asset_pipeline.html#precompiling-assets) and in your `config/application.rb` set:
+
+ config.assets.initialize_on_precompile = false
+
## Templates directory
-You should located your templates under `app/assets/templates`. In your Javascript manifest file, use `require_tree`
+You should locate your templates with your other assets, for example `app/assets/templates`. In your Javascript manifest file, use `require_tree` to pull in the templates
//= require_tree ../templates
## The template file
@@ -88,7 +95,8 @@
* Les Hill (@leshill)
# Contributors
-* Matt Burke (@spraints) : execjs support
-* (@kendagriff) : 1.8.7 compatibility
+* Matt Burke (@spraints) : execjs support
+* (@kendagriff) : 1.8.7 compatibility
+* Thorben Schröder (@walski) : 3.1 asset group for precompile