I have a language scope in my routes, all urls looking good www.lvh.me/en/[*path....]
with the exception of the root_url displayed as : http://www.lvh.me/?locale=en I am trying for a couple of hours to get a root url being : http://www.lvh.me/en/ as I get with the initial constraint when no subdomain given, but no way , everytime I use redirect_to root_url , I get this http://www.lvh.me/?locale=en the default_url_options seems not to be used , as I try to have a debug line in it .. no way def default_url_options(options={}) if request.fullpath == "/" {} else { :locale => I18n.locale } end end __________ scope "/:locale" do ... .... end constraints(:subdomain => nil, :host => host) do root :to => redirect("http://www.#{host}#{port}/#{I18n.locale.to_s}/") match '/*path', :to => redirect {|params| "http://www.#{host}#{port}/#{I18n.locale.to_s}/#{params[:path]}"} end root :to => "cms_content#render_html" _________ -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/ZYXSkBSFYbEJ. For more options, visit https://groups.google.com/groups/opt_out.

