summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-09-17 04:06:40 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-09-17 04:06:40 +0000
commitebb445c36468529cc7873136469a6162660ad253 (patch)
tree177e143868235f1c2431f4155c0d28cf0c821dd9 /vendor
parent35dba0f412b7aa29a839869fdb9e020585dd89c5 (diff)
downloadredmine-ebb445c36468529cc7873136469a6162660ad253.tar.gz
redmine-ebb445c36468529cc7873136469a6162660ad253.zip
Use the relative_url_root when generating asset_paths. #3935
Contributed by Daniel S from Redmine. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4094 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'vendor')
-rw-r--r--vendor/plugins/engines/lib/engines/rails_extensions/asset_helpers.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/plugins/engines/lib/engines/rails_extensions/asset_helpers.rb b/vendor/plugins/engines/lib/engines/rails_extensions/asset_helpers.rb
index 9fd1742c4..a4a9266f2 100644
--- a/vendor/plugins/engines/lib/engines/rails_extensions/asset_helpers.rb
+++ b/vendor/plugins/engines/lib/engines/rails_extensions/asset_helpers.rb
@@ -109,11 +109,11 @@ module Engines::RailsExtensions::AssetHelpers
# Returns the publicly-addressable relative URI for the given asset, type and plugin
def self.plugin_asset_path(plugin_name, type, asset)
raise "No plugin called '#{plugin_name}' - please use the full name of a loaded plugin." if Engines.plugins[plugin_name].nil?
- "/#{Engines.plugins[plugin_name].public_asset_directory}/#{type}/#{asset}"
+ "#{ActionController::Base.relative_url_root}/#{Engines.plugins[plugin_name].public_asset_directory}/#{type}/#{asset}"
end
end
module ::ActionView::Helpers::AssetTagHelper #:nodoc:
include Engines::RailsExtensions::AssetHelpers
-end \ No newline at end of file
+end