0

My routes.rb

Rails.application.routes.draw do
  scope "(:locale)", locale: /fr-FR|de-DE|es-ES|zh-CN/ do
    get ":id" => "high_voltage/pages#show", as: :page, format: false
...

Which works fine for things on the top level like /pricing however pages nested inside folders (e.g. /pricing/products) get routes like /zh-CN/pricing%2Fproducts (which routes correctly, but looks ugly) and also /zh-CN/pricing/products does not route correctly

4

1 に答える 1

1
get "*id" => "high_voltage/pages#show", as: :page, format: false  

私のルートファイルで問題を修正します

于 2015-07-14T12:24:00.240 に答える