joshv.kw-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Mar-21 09:13 UTC
Custom URLs in Rails
like for example virb.com/yourURLHere, how is this accomplished... I''ve been searching for a bit but I haven''t found a solution. Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
joshv.kw-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> like for example virb.com/yourURLHere, how is this accomplished... > I''ve been searching for a bit but I haven''t found a solution. > > Thankstake a look at some of these solutions http://www.railslodge.com/tags/all/url -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
joshv.kw-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Mar-21 17:59 UTC
Re: Custom URLs in Rails
Let me rephrase.... When I say custom URL I mean... that http://www.yoursite.com/controller is the regular format.... What if it was http://www.yoursite.com/your_screen_name, and then route that to the profile controller and index action for example. Make sense? On Mar 21, 5:24 am, Scott A S <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> joshv...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > > like for example virb.com/yourURLHere, how is this accomplished... > > I''ve been searching for a bit but I haven''t found a solution. > > > Thanks > > take a look at some of these solutionshttp://www.railslodge.com/tags/all/url > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Read up on routing. There is a file called routes.rb in your config directory that does this mapping for you. This is a good place to start. http://www.chariotsolutions.com/slides/ete2007-black-rails-routing-roundup.pdf On Mar 21, 10:59 pm, "joshv...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <joshv...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Let me rephrase.... > > When I say custom URL I mean... thathttp://www.yoursite.com/controller > is the regular format.... What if it washttp://www.yoursite.com/your_screen_name, > and then route that to the profile controller and index action for > example. > > Make sense? > > On Mar 21, 5:24 am, Scott A S <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > > > joshv...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > > > like for example virb.com/yourURLHere, how is this accomplished... > > > I''ve been searching for a bit but I haven''t found a solution. > > > > Thanks > > > take a look at some of these solutionshttp://www.railslodge.com/tags/all/url > > -- > > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
joshv.kw-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Mar-22 07:44 UTC
Re: Custom URLs in Rails
Thanks for the help... BTW it is my first time even using rails =) heres'' what I finally was able to do map.connect ''*path'', :controller => ''profile'', :action => ''index'' at the bottom of routes... Seems to work. Cheers On Mar 21, 11:04 am, Mukund <marut...-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> Read up on routing. There is a file called routes.rb in your config > directory that does this mapping for you. > > This is a good place to start. > > http://www.chariotsolutions.com/slides/ete2007-black-rails-routing-ro... > > On Mar 21, 10:59 pm, "joshv...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <joshv...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Let me rephrase.... > > > When I say custom URL I mean... thathttp://www.yoursite.com/controller > > is the regular format.... What if it washttp://www.yoursite.com/your_screen_name, > > and then route that to the profile controller and index action for > > example. > > > Make sense? > > > On Mar 21, 5:24 am, Scott A S <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > wrote: > > > > joshv...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > > > > like for example virb.com/yourURLHere, how is this accomplished... > > > > I''ve been searching for a bit but I haven''t found a solution. > > > > > Thanks > > > > take a look at some of these solutionshttp://www.railslodge.com/tags/all/url > > > -- > > > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---