2
在一个Rails 3.2应用程序中,我使用Devise和path_prefix
和本地化的作用域路线。如何在Devise中使用scoped locale + path_prefix?
#routes.rb
MyApp::Application.routes.draw do
scope "(:locale)", locale: /#{I18n.available_locales.join("|")}/ do
devise_for :admins,
path_prefix: 'administration',
end
...other resources
end
end
虽然我的所有其他资源的URL在地址栏正确例如/en/resource/1
编写,设计路径传递的语言环境作为参数/administration/admins/registrations/login?locale=en
如何鼓励设计使用的格式?