my app has scoped routes :
MyApp::Application.routes.draw do
scope “/:locale” do
…
…
end
root :to => “cms_content#render_html”, :defaults => { :locale =>
I18n.locale }
end
I also have an helper to preset the locale for all my routes :
def default_url_options(options={})
{ :locale => I18n.locale }
end
so all urls are generated like :
http://www.mydomain.com/en/users
…
but for the root url
it generates :
http://www.mydomain.com/?locale=en
which is correctly handled by my app , but not so nice displayed …
I’d prefer to see the root url being :
http://www.mydomain.com/en/
is there anyway to get it ?