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
Written by Ben Linton
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#