How to avoid view directory creation after run controller generator?

40 views Asked by At

I'm trying to run this command:

rails generate controller users --no-helper --no-assets --no-view-specs --no-controller-specs

to create the controller file only. But, I can't find a way to avoid view directory creation. How can I do this?

1

There are 1 answers

3
thedanotto On

Instead of running a generator it'd be easiest to create the users_controller.rb file yourself and populate it with

class UsersController < ApplicationController
end