aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/admin_general_controller.rb
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-02-19 14:27:47 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-02-25 16:26:52 +1100
commit5f7d17bc2128d7de3749f65d3e9168e2fcc1a478 (patch)
treee48c8a8c787f80f96b50f563d4aafb3794bdf01e /app/controllers/admin_general_controller.rb
parent0699f148f43d58eef818cf710bd182cc99196ad2 (diff)
Move serving of js for admin interface from general to admin_general controller
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 81c34a3b3..800678787 100644
--- a/app/controllers/admin_general_controller.rb
+++ b/app/controllers/admin_general_controller.rb
@@ -5,6 +5,8 @@
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
class AdminGeneralController < AdminController
+ skip_before_filter :authenticate, :only => :admin_js
+
def index
# ensure we have a trailing slash
current_uri = request.env['REQUEST_URI']
@@ -139,5 +141,10 @@ class AdminGeneralController < AdminController
@github_origin = "https://github.com/#{repo}/tree/"
@request_env = request.env
end
+
+ # TODO: Remove this when support for proxy admin interface is removed
+ def admin_js
+ render :layout => false, :content_type => "application/javascript"
+ end
end