I don't know how to set up my routes to have the following effect:

[![The image](https://i.stack.imgur.com/jjBYB.png)](https://i.stack.imgur.com/jjBYB.png)

What I have now are:

```
get 'change_password' => 'staffs#edit_password', as: :change_staff_password
patch 'change_password' => 'staffs#update_password', as: :change_staff_password

```

But it raises error: `ArgumentError: Invalid route name, already in use: 'change_staff_password_staff'`

The reason to do this is because the path is named **"change\_password\_staff"** without `as:`. However, I want it to be **"change\_staff\_password"** with staff in the middle for clarity.

I look up `match` and found `match ":controller/:action/:id"`

But how should I set up this to allow paths share same path name?