"high_voltage/pages#show", as: :pag" /> "high_voltage/pages#show", as: :pag" /> "high_voltage/pages#show", as: :pag"/>

Routing issues with High Voltage and locale

135 views Asked by At

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

1

There are 1 answers

0
Lindsey B On
get "*id" => "high_voltage/pages#show", as: :page, format: false  

in my routes file fixes the issue