ruby - Don't create view folder on rails generate controller -
this trivial question, i'm curious:
is there way usual generators config turn off creation of view folders , action templates when run rails generate controller
?
i can't find option anywhere , code here doesn't show me pointers.
we going building our own controller / resource generators @ point anyway, our api, curious if there way turn off annoyance in meantime.
it's not documented feature, try add --skip-template-engine
(alias --no-template-engine
) option command.
rails generate controller foo bar --skip-template-engine
demo on dummy app:
rails g controller my_controller index show --no-template-engine create app/controllers/my_controller_controller.rb route "my_controller/show" route "my_controller/index" invoke test_unit create test/functional/my_controller_controller_test.rb invoke helper create app/helpers/my_controller_helper.rb invoke test_unit create test/unit/helpers/my_controller_helper_test.rb invoke assets invoke coffee create app/assets/javascripts/my_controller.js.coffee invoke scss create app/assets/stylesheets/my_controller.css.scss
Comments
Post a Comment