Currently in my routes I have:
# USER RESOURCES
resources :users do
resources :repositories
patch 'change_password'
get 'account_setting'
end
Which generates this path for the account_setting
action:
user_account_setting GET /users/:user_id/account_setting(.:format) users#account_setting
What I want is to have:
user_account_setting GET /users/:id/account_setting(.:format) users#account_setting
The two are essentially the same thing, but the first has a user_
prefix for the id
which rails adds because it is in users resource block.
SIDE NOTE
I know I can simply remove the account_setting
action from the users resource block and write:
get 'users/:id/account_setting', to: 'users#account_setting'
But I don't want to.