You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reusing controllers on different paths identically named placeholders might be added. See this example:
get '/users/:user_id/permissions' => 'permissions#index'
get '/permissions' => 'permissions#index'
The same controller is used for both actions as the user_id is just an optional filter for the permissions controller. Nevertheless the controller describes it as a param:
class PermissionsController < ApplicationController
rfc6570_params index: %i[context user_id]
end
This will generate the following URI template for user_permissions:
/users/{user_id}/permissions{?context}{&user_id}
This will insert the User ID twice when expanding:
When reusing controllers on different paths identically named placeholders might be added. See this example:
The same controller is used for both actions as the
user_id
is just an optional filter for the permissions controller. Nevertheless the controller describes it as a param:This will generate the following URI template for
user_permissions
:This will insert the User ID twice when expanding:
Proposal
The query parameter
user_id
might just be skipped while kept for other routes:The text was updated successfully, but these errors were encountered: