Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Adi Luhung Suryadi's Profile

GitHub User: hungmac

Site: http://gplus.to/adiluhung

Comments by Adi Luhung Suryadi

Avatar

no worries, i was able to fix my problem by changing last two line of code on the route

ruby
  match '*path', to: redirect {|params| "/#{I18n.default_locale}/#{params[:path]}"}, constraints: lambda { |req| !req.path.starts_with? "/#{I18n.default_locale}/" }
  match '', to: redirect("/#{I18n.default_locale}")
Avatar

Hi, anybody knows why when i type long urls it redirected to an escaped url?
http://localhost:3000/users/login becomes http://localhost:3000/id/users%2Flogin