What is the usual way to let a user modify his own data and the admin to
edit and view the data of all users.
I could do:
- create a Person model with a route
that works fine, if I check the permissions for :admin and non admin
but for a user I have the /person/334/edit route. But for the user
which is not an admin, I’d like not to have this id in the route.
- routed like this:
namespace :admin do
namespace :user do
but then I have two controllers, can I put this together as one?
What is the usual way to fix the user edits his own, and the admin edits