RailsCasts Pro episodes are now free!

Learn more or hide this

Adi Luhung Suryadi's Profile

GitHub User: hungmac

Site: http://gplus.to/adiluhung

Comments by Adi Luhung Suryadi


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

  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}")

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