README.md in sht_rails-0.2.0 vs README.md in sht_rails-0.2.1
- old
+ new
@@ -43,9 +43,18 @@
config.action_view_key = 'handlebars' # change name of key for rendering in ActionView mustache template
config.template_namespace = 'SHT' # change templates namespace in javascript
config.template_base_path = Rails.root.join("app", "templates") # templates dir
end
+### Note on precompiling assets and custom configs
+
+In Rails, if you have config.assets.initialize\_on\_precompile set to false, but have placed the above config in an initializer, it will not run. To get around this, you can do the following in application.rb:
+
+ if "assets" == ENV["RAILS_GROUPS"] || ["development", "test"].include?(ENV["RAILS_ENV"])
+ ShtRails.template_namespace = 'JST'
+ end
+
+
## Demo
Site: [http://st-rails-example.herokuapp.com](http://st-rails-example.herokuapp.com)
Source code: [https://github.com/le0pard/st_rails_example](https://github.com/le0pard/st_rails_example)