What is the syntax to skip creating tests, assets & helpers when running `rails generate controller`?

I read the help & tried the following command to skip generation of tests, assets & helper files

$ bin/rails generate controller home index  --helper false --assets false --controller-specs false --view-specs false   
create- app/controllers/home_controller.rb
        route  get "home/index"
        invoke  erb
        create    app/views/home
        create    app/views/home/index.html.erb
        invoke  rspec
        error  false [not found]
        error  false [not found]

As you may notice by output above this works & only controller, routes & views are generated. But as last two lines are interesting:

error  false [not found]
error  false [not found]

Obviously rails doesn't seem to like --option-name false syntax. so this this error because I used the wrong syntax? If yes, then what is the correct way? Thanks


Try using --no- followed by optionname:

rails generate controller home index  --no-helper --no-assets --no-controller-specs --no-view-specs

If you want to change the default behavior every time you run the generator command, you can configure the defaults you would like in the application.rb file - see How can I make sure Rails doesn't generate spec tests for views and helpers?.

Need Your Help

WebGrid footer get styling for the current page

jquery css asp.net-mvc styling webgrid

Im trying to get a WebGrid view to work using razor, and so far i have managed to style mostly everything apart from the paging icons of the footer.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.