Welcome to the Treehouse Community
Looking to learn something new?
Rails: How do I?
I want to incorporate a feature into a site I'm designing in rails. I want to be able to assign a user his/her own url to their profile page in the form of www.mydomain.com/userprofilepage How will i need to do this? Surely I don't want to give every user a named route in routes.rb?
Maybe you need to override the
to_param method in your User model with whatever the user sets, as this StackOverflow answer demonstrates. I'd create a new table which is linked to the User model and holds the custom URLs and the corresponding User IDs (this way it will be easier to validate uniqueness).
Thank you! I should have known there would bean easy solution.