Is there a way, using rails generators, to create a controller with RESTful routes?
Generating a controller and specifying the action name creates a controller and adds a route to config/routes.rb
, but create
is a get
:
$ rails g controller foos new create
create app/controllers/foos_controller.rb
route get "foos/create"
...
I'd prefer to see route post "foos"
, but don't see anything useful in rails g controller --help