Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Evan Sherwood's Profile

GitHub User: neezer

Site: http://neezer.net/

Comments by Evan Sherwood

Avatar

Nevermind... just figured out that I was passing in user instead of user.id.

Avatar

Is there anyway for me to use both friendly_id and the record id? I'd like to use friendly_id in my consumer-facing URLs, but the record id in my admin URLs... is there anyway to do that?

EDIT: Ok, I see that I can manually change the parameter in the URL, and it still works as expected.. but my path helpers all use the friendly id, e.g.:

ruby
edit_admin_user_path(user.id) #=> /users/some-friendly-id/edit

How can I get this?

ruby
edit_admin_user_path(user.id) #=> /users/4/edit
edit_user_path(user.id) #=> /users/some-friendly-id/edit