David for the route to show up like twitter, you can use friendly_id <https://github.com/norman/friendly_id> gem. or write your own route like this
get "/:profile_id" => "profiles#show", :as => "user_profile", :constraints => { :profile_id => /[^\/]+/ } On Fri, Dec 19, 2014 at 11:49 PM, Colin Law <clan...@gmail.com> wrote: > On 19 December 2014 at 18:03, David Williams <li...@ruby-forum.com> wrote: > > Colin Law wrote in post #1164989: > >> On 19 December 2014 at 17:17, David Williams <li...@ruby-forum.com> > >> wrote: > >>>> > >>> during signup for normal users. They have to put both their :username > >>> and :email in. How could I show just /:username when a person routes to > >>> their own show page? > >> > >> I think I must be misunderstanding the question, you can show as much > >> or as little as you like, just put what you want in the view, and > >> leave out what you do not want. > >> > >> Colin > > > > No, I'm beyond the view issue. I was just trying to fix the route as it > > displays the users [:id] instead of the [:username]. For instance > > twitter.com/username on show page for user. Thanks for your help so far. > > Have a look at the rails guide on routing, you can use match to make > up any route you like. > > Colin > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsK8rWQStm910uSpMFcGkX2h8-pHgy7hiA1u1ZC-k1JcA%40mail.gmail.com > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAFKVRj-AYSAvEjgXn2wupNBDqUYYZjgdzVEFSouC1TU-6Mq8GA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.