# Override to\_param + restful\_authentication

**URL:** <https://www.ruby-forum.com/t/override-to-param-restful-authentication/123175>\
**Category:** Rails\
**Created:** [December 14, 2007, 5:44pm UTC](https://www.ruby-forum.com/t/override-to-param-restful-authentication/123175 "2007-12-14T17:44:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kei\_Simone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/839c29/32.png) [@Kei\_Simone](https://www.ruby-forum.com/u/Kei_Simone)\
**Post date:** [December 14, 2007, 5:44pm UTC](https://www.ruby-forum.com/t/override-to-param-restful-authentication/123175/1 "2007-12-14T17:44:49Z")

</div>

To all:

Hi,

i think i realise what i went wrong here at  
[http://groups.google.com/group/rubyonrails-talk/browse\_thread/thread/47c3b56034adf347/265b30d3cd97e137?lnk=gst&q=restful\_authentication+nested#](http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/47c3b56034adf347/265b30d3cd97e137?lnk=gst&q=restful_authentication+nested#)

I think its all due to the problem of me using restful authentication  
and override to\_param method with a

# overriding to\_param method to use permalink instead of id

def to\_param  
self.permalink  
end

inside my User model (user.rb)

to make my urls look like localhost:3000/users/peter\_login/orders

rather than localhost:3000/users/2/orders

How do i reconcile getting more meaningful urls with restful  
authentication?

Thank you.
