aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/admin_general_controller.rb
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2011-08-09 21:09:10 +0100
committerRobin Houston <robin.houston@gmail.com>2011-08-09 21:09:10 +0100
commit7d1eb5df0c1bcc6a7a92755004faf85bc00496d4 (patch)
tree6f2cda5408b633662b865c1bc435cbb63b110ac8 /app/controllers/admin_general_controller.rb
parentb6860bea9d4569a52801d72734fa86849c232721 (diff)
parente6fda87211f3c525c17b0d8a2c039192a6c18bb6 (diff)
Merge branch 'master' into wdtk
Diffstat (limited to 'app/controllers/admin_general_controller.rb')
-rw-r--r--app/controllers/admin_general_controller.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/admin_general_controller.rb b/app/controllers/admin_general_controller.rb
index 5073cdc5b..ae51e0923 100644
--- a/app/controllers/admin_general_controller.rb
+++ b/app/controllers/admin_general_controller.rb
@@ -8,6 +8,13 @@
class AdminGeneralController < AdminController
def index
+ # ensure we have a trailing slash
+ current_uri = request.env['REQUEST_URI']
+ if params[:suppress_redirect].nil? && !(current_uri =~ /\/$/)
+ redirect_to admin_general_index_url + "/"
+ return
+ end
+
# Overview counts of things
@public_body_count = PublicBody.count