Rails route dependent on current user

Posted by Lowgain on Stack Overflow See other posts from Stack Overflow or by Lowgain
Published on 2010-05-04T00:34:37Z Indexed on 2010/05/04 0:38 UTC
Read the original article Hit count: 719

Filed under:
|

I'd like to create a rails route for editing a user's profile.

Instead of having to use /users/:id/edit, I'd like to have a url like /edit_profile

Is it possible to create a dynamic route that turns /edit_profile into /users/{user's id}/edit, or should I do thing in a controller or?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about routes