RailsCasts Pro episodes are now free!

Learn more or hide this

Ithyvan's Profile

GitHub User: Ithy

Comments by Ithyvan

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 !