diff options
author | Mark Longair <mhl@pobox.com> | 2013-08-21 14:26:49 +0100 |
---|---|---|
committer | Mark Longair <mhl@pobox.com> | 2013-08-21 14:26:49 +0100 |
commit | 8dea412e69d62d336a079dc0f27eacd0566c6242 (patch) | |
tree | 807b08ed7cf957a69e85166fa6bbd86d12269ae1 /app/controllers/admin_general_controller.rb | |
parent | 4dc5bfce6f8a34aa9f01e9232190fa2c169727a9 (diff) |
Serve admin.js as a static file
admin.js was being generated from a view so that the config variable
ADMIN_PUBLIC_URL could be used to direct AJAX requests in the admin
interface correctly. ADMIN_PUBLIC_URL was necessary for
WhatDoTheyKnow when the admin interface was proxied over SSL, while
the rest of the site was non-SSL. Now that the whole site is served
over SSL, however, the proxy for the admin interface is not longer
used and ADMIN_PUBLIC_URL / ADMIN_BASE_URL have been removed.
As a result, admin.js is now being generated from a Rails view
unnecessarily, and at some performance cost. This commit moves
admin.coffee and admin.js to the public directory, so they will
be served more efficiently.
In addition, this commit removes admin.coffee / admin.js from
public/javascripts/ where there was a second (and different) version
that now appears to be unused.
Diffstat (limited to 'app/controllers/admin_general_controller.rb')
-rw-r--r-- | app/controllers/admin_general_controller.rb | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/app/controllers/admin_general_controller.rb b/app/controllers/admin_general_controller.rb index ec5f95eda..196616ed6 100644 --- a/app/controllers/admin_general_controller.rb +++ b/app/controllers/admin_general_controller.rb @@ -5,7 +5,6 @@ # Email: hello@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 @@ -142,9 +141,5 @@ class AdminGeneralController < AdminController @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 |