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 ?
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/B-CsnLJGXjMJ.
For more options, visit https://groups.google.com/groups/opt_out.