在 Rails 3.2 应用程序中,我使用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
我如何鼓励 Devise 使用该格式/locale/path_prefix/route?