The goal is for a vanilla app to render coffee templates in production the same as it does in development and test. As far as I can tell, that simply means moving coffee-rails from :assets to the top-level.
Not the same thing. gsub'ing works even when you interpolate "\n" in the heredoc (causing the following line to start at column 0).
You shouldn't need to do this; assets gems belong in the assets group. To turn on asset compilation in production just
config.assets.compile = true
Yes, Rails default strategy is to precompile assets only in production. If you need to change it, you should do it in your own app and it can be done as @steveklabnik said and by changing config/application.rb to require assets in production.
This isn't about assets, it's about templates.
If you need coffeescript templates you should change in your application. Not every application use coffeescript templates and we don't want to make this the Rails default.
How about about disabling coffee templates in test and development by default?
I don't think is worth, doing this we will also disable coffeescript assets. If you need coffee templates on production just put the gem in the top level
Fair enough, thanks guys.
I'm +1 on this. We're bundling and encouraging coffeescript. It is the Rails default already.
And it's extra confusing that they work in dev/test, then break when you deploy.
This describes what changed, but not its purpose or relevance.
Imagine you're reading this changelog to hear about new things you can do with Rails.
What does this tell you? What should it tell you?
Thanks for this feedback.
I'm not sure if we still needing the :assets group in the Gemfile, I think the assets compilation isn't done 'by accident' anymore in production when a requested asset is not precompiled
@guilleiguaran Yeah, I remove the assets group in apps now. Nice to go back to Bundler.require :default in config/application.rb instead of the strange Bundler.require :assets => ... line.
Bundler.require :assets => ...
@gkop Could you update the changelog entry and rebase master? ❤️
Put coffee-rails in top-level of generated Gemfile
v3 of pull request based on additional feedback from @jeremy