By definition, you cannot use resources
without a controller name unless it’s under a namespace. This creates a valid helper and URL leading nowhere, e.g:
# config/routes.rb
Rails.application.routes.draw do
namespace :api do
resources
end
end
Which makes the mapper code use “api/” as the controller;
$ rails routes
Prefix Verb URI Pattern Controller#Action
api__index GET /api(.:format) api/#index
POST /api(.:format) api/#create
api GET /api/:id(.:format) api/#show
PATCH /api/:id(.:format) api/#update
PUT /api/:id(.:format) api/#update
DELETE /api/:id(.:format) api/#destroy
Opening this topic to understand if this is a/the expected case or if it might just lead to uncertain bugs and/or confusions.