Created
December 27, 2016 04:17
-
-
Save Sunnyztj/56ed1ed3fc6ff3f372ab89a4afb8d36b to your computer and use it in GitHub Desktop.
I18n root path setting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.routes.rb | |
root to: 'application#redirect_to_home_index' | |
get '/:locale', to: "home#index", as: 'home' | |
2. application_controller.rb | |
def redirect_to_home_index | |
redirect_to home_path | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment