Last Updated: February 25, 2016
·
1.838K
· benlinton

Generate rails controllers without assets

To generate a rails controller without the javascript or stylesheet assets, simply add the --skip-assets flag to the rails generate command:

$ rails generate controller foobar --skip-assets

If you want your rails app to skip asset generation by default:

# config/application.rb
config.generators.stylesheets = false
config.generators.javascripts = false 

Or disable all asset generation with a single line:

# config/application.rb
config.generators.assets = false