views:

176

answers:

2

Is there an easy way to add a permanent string to every route in a Rails app, given that I already have quite a few resources specified and don't want to refactor all into a namespace?

Can I do something along the lines of

map.root 'myappnamehere'

and have that string appended to the beginning of all routes? I realise that this is not how I implement map.root normally.

TIA

+2  A: 

path_prefix?

Rich Apodaca
cheers. It was buried right at the bottom of that doc!
The Pied Pipes
You'll want to do map.with_options :path_prefix => "..." do |map| ... end to make it apply for all routes easily.
Samuel
A: 

you should be add prefix