aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/link_to_helper.rb
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2011-07-26 16:00:11 +0100
committerRobin Houston <robin.houston@gmail.com>2011-07-26 16:00:11 +0100
commit008e64e7caff284d4422e10ea20090d079030878 (patch)
tree6c2685ee42fee90cfcbc9386ade05fec5fae41e7 /app/helpers/link_to_helper.rb
parentdc69d7b10e379af276aa5b959a4ab210155f19ad (diff)
Add the ADMIN_BASE_URL variable to general.yml-example, and make the code
treat an empty value the same as if the variable were absent (i.e. to use the default admin path).
Diffstat (limited to 'app/helpers/link_to_helper.rb')
-rwxr-xr-xapp/helpers/link_to_helper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb
index 6d8ae345e..444129052 100755
--- a/app/helpers/link_to_helper.rb
+++ b/app/helpers/link_to_helper.rb
@@ -162,7 +162,8 @@ module LinkToHelper
# Admin pages
def admin_url(relative_path)
- admin_url_prefix = MySociety::Config.get("ADMIN_BASE_URL", admin_general_index_path+"/")
+ admin_url_prefix = MySociety::Config.get("ADMIN_BASE_URL", "")
+ admin_url_prefix = admin_general_index_path+"/" if admin_url_prefix.empty?
return admin_url_prefix + relative_path
end