At the moment when I generate a new controller, Rails also generates a .js.coffee
file for the controller as well. As I don't use CoffeeScript I want Rails instead generate .js
files for me.
Is it enough to comment out the coffee-rails
gem to completely disable CofeeScript in a Rails 3.1 app?
CoffeeScript is no longer recommended by the Rails community.
gem "coffee-script"
in your GemfileNot sure if this counts for Rails 3.1 but in 4 you should also set the javascript_engine
to :js
in application.rb
to instruct generators to create .js
files instead of .js.coffee
.
config.generators do |g| # .. other configuration .. g.javascript_engine :js end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With