How do I turn off automatic stylesheet/javascript generation on Rails 3.1? How do I turn off automatic stylesheet/javascript generation on Rails 3.1? ruby ruby

How do I turn off automatic stylesheet/javascript generation on Rails 3.1?


Add these lines to application.rb:

config.generators.stylesheets = falseconfig.generators.javascripts = false


New syntax is rails generate controller Resources --no-assets.

Don't forget you can also use g in place of generate. And you can skip the creation of a controller helper using the --no-helper flag.


For just one time, use:

rails generate controller controller_name --no-assets