Rails optional /:locale route

后端 未结 2 1070
梦如初夏
梦如初夏 2021-01-05 17:58

I\'m trying to setup a routing system for my rails app that allows for an optional route (/:locale) to be allowed to the base of the website.

So more or less:

<
2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-05 18:24

    Use scope '(:locale)' do...end. You can see an example from Agile Web Development with Rails here:

    http://intertwingly.net/projects/AWDwR4/checkdepot-30/section-15.1.html

提交回复
热议问题