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

[email protected] 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 solutions
http://www.railslodge.com/tags/all/url

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 [email protected]

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

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs