diff options
author | francis <francis> | 2007-12-14 13:24:04 +0000 |
---|---|---|
committer | francis <francis> | 2007-12-14 13:24:04 +0000 |
commit | 9bdc07ebd51d0fb77a703a6f6c1e968d87bc699d (patch) | |
tree | 62afeb41213f262fbcdf206353e5ec02fca99932 /app/helpers/link_to_helper.rb | |
parent | 5232b8d65a9cf5d5d1db20962f35b774c42dd204 (diff) |
Get redirects right for proxied admin URLs.
Diffstat (limited to 'app/helpers/link_to_helper.rb')
-rw-r--r-- | app/helpers/link_to_helper.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb index 24ee8e578..8eeed45b5 100644 --- a/app/helpers/link_to_helper.rb +++ b/app/helpers/link_to_helper.rb @@ -5,7 +5,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: link_to_helper.rb,v 1.2 2007-11-06 16:05:29 francis Exp $ +# $Id: link_to_helper.rb,v 1.3 2007-12-14 13:24:04 francis Exp $ module LinkToHelper @@ -41,6 +41,11 @@ module LinkToHelper text.gsub!(/[^a-z0-9_-]/, "") text end + + def admin_url(relative_path) + admin_url_prefix = MySociety::Config.get("ADMIN_BASE_URL", "/admin/") + return admin_url_prefix + relative_path + end end |