【发布时间】:2014-02-28 12:30:29
【问题描述】:
在我的 Rails 应用程序中,我将语言环境限定为我的网址:
http://localhost:3000/de/blah/blubb
http://localhost:3000/en/blah/blubb
http://localhost:3000/es/blah/blubb
^^^
如何在没有 locale 参数的情况下“获取”current_url?
http://localhost:3000/blah/blubb
^^^
目前我有这个:
<%= "#{request.protocol}#{request.host_with_port}#{request.fullpath}" %>
# http://localhost:3000/de/blah/blubb
【问题讨论】:
标签: ruby-on-rails url locale rails-i18n