diff options
author | francis <francis> | 2009-08-24 12:39:04 +0000 |
---|---|---|
committer | francis <francis> | 2009-08-24 12:39:04 +0000 |
commit | 02e81b4c04ee686db737f4e91797c776bd2bc1bd (patch) | |
tree | a5da4b70465a8d848f0093c3f3f723d79b371a5e /config/environment.rb | |
parent | 3dcb939bfb8fec208927a230885acbb13e430d73 (diff) |
Use full URL for javascript so works in admin pages.
Diffstat (limited to 'config/environment.rb')
-rw-r--r-- | config/environment.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/config/environment.rb b/config/environment.rb index 76f459889..85e23e8a4 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -97,6 +97,11 @@ end # Domain for URLs (so can work for scripts, not just web pages) ActionController::UrlWriter.default_url_options[:host] = MySociety::Config.get("DOMAIN", 'localhost:3000') +# So that javascript assets use full URL, so proxied admin URLs read javascript OK +if (MySociety::Config.get("DOMAIN", "") != "") + ActionController::Base.asset_host = MySociety::Config.get("DOMAIN", 'localhost:3000') +end + # Monkeypatch! Method to remove individual error messages from an ActiveRecord. module ActiveRecord class Errors |