test/test_app/config/routes.rb in rails-localization-0.2.0 vs test/test_app/config/routes.rb in rails-localization-1.2.0
- old
+ new
@@ -5,15 +5,18 @@
get :welcome, :to => 'main#welcome'
root :to => 'main#index'
end
TestApp::Application.routes.draw do
- mount SubApp::Engine => '/sub', :as => :sub_app_engine
+ localized({"en" => "English", "ru" => "Russian"}) do
+ mount SubApp::Engine => '/sub', :as => :sub_app_engine
- get :users, :to => "users#index"
- get "users/with_locale", :to => "users#with_locale"
- get "users/without_locale", :to => "users#without_locale"
- get "users/with_defined_locale", :to => "users#with_defined_locale"
- get :welcome, :to => 'main#welcome'
+ get :users, :to => "users#index"
+ get "users/with_locale", :to => "users#with_locale"
+ get :welcome, :to => 'main#welcome'
- root :to => 'main#index'
+ root :to => 'main#index'
+ end
+
+ get "users/without_locale", :to => "users#without_locale"
+ get "users/with_defined_locale", :to => "users#with_defined_locale", locale: "en"
end