routes の指定† conf/routes.rb LANG:ruby # coding: utf-8 MyApp::Application.routes.draw do # '/' は MyDefaultController.index へ root 'my_default#index' # 有効なロケールは en と ja locale_regexp= /en|ja/ # '/en', '/ja' は MyDefaultController.index へ get ':locale' => 'my_default#index', constraints: { locale: locale_regexp } # 省略可能な locale スコープを用意する scope "(:locale)", locale: locale_regexp do # some_resources には、'