Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Ithy's Profile

GitHub User: Ithy

Comments by

Avatar

Hi i use rails 4.

I have a loop in my url when i put bad locales : example : site.com/zz/

It's look like : site.com/en/en/en/en/en/zz/

In my config/routes.rb i have :

config/routes.rb
match '', to: redirect{|params| "/#{I18n.default_locale}"}, via: :all
match '*path', to: redirect{|params| "/#{I18n.default_locale}/#{params[:path]}"}, via: :all

Does anyone have the same issue ?

Avatar

Thanks for this one more time amazing railscast !

Avatar

Thx @shamgar that's work for me !