creating routes an discretionary route prefix


how i origination routes recognize an discretionary prefix parameter follows:



/*lang/controller/id


in lang biased optional, default value it's specified url:



/en/posts/1   => lang = en
/fr/posts/1 => lang = fr
/posts/1 => lang = en


edit



ideally, i'm looking opposing controllers actions mapping namespace:



map.namespace "*lang" |lang|
lang.resources :posts
lang.resources :stories
end


Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?