Open sidnair opened 12 years ago
Thanks for the work on this. I was toying with the idea of just adding the configuration inside the gem, similar to this: https://github.com/indirect/haml-rails/blob/master/lib/haml-rails.rb#L7-11
However, I don't want to force the use of polyfills.js just by virtue of loading the gem. I think perhaps the best compromize is to generate a new initializer in config/initializers. That way it can be deleted. I also don't think you want to force env production since you have full control of what environment you run the precompile rake task. So presumably it only gets run on deploy to production (or staging) anyway. But I like to run it in development sometimes just to see if it's working.
For some reason I thought config.assets.precompile was in application.rb, but its in production. So using @sidnair09s example might be a good option. Sorry. I'll try and get this implemented or merged in the next day or so.
I think this is the only change required for precompilation to work.
Edit: I just saw issue 9. I'll leave this issue open in case you decide against using an initializer. Sorry for the duplication.