# HG changeset patch # User Chris Cannam # Date 1309174629 -3600 # Node ID dff13616e4645747023fbdfaab134030be60fbe7 # Parent 7d8567890fa37eeddaa7d547544625d9fd07dda6 Avoid double-slash in path diff -r 7d8567890fa3 -r dff13616e464 app/controllers/application_controller.rb --- a/app/controllers/application_controller.rb Fri Apr 01 12:11:13 2011 +0100 +++ b/app/controllers/application_controller.rb Mon Jun 27 12:37:09 2011 +0100 @@ -266,7 +266,11 @@ # soundsoftware: if back_url is the home page, # change it to My Page (#125) if (uri.path == home_path) - uri.path = uri.path + "/my" + if (uri.path =~ /\/$/) + uri.path = uri.path + "my" + else + uri.path = uri.path + "/my" + end end # soundsoftware: if login page is https but back_url http, # switch back_url to https to ensure cookie validity (#83)