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
Post a Comment