Skip to content

Commit

Permalink
Use the relative_url_root when generating asset_paths. #3935
Browse files Browse the repository at this point in the history
Contributed by Daniel S from Redmine.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4094 e93f8b46-1217-0410-a6f0-8f06a7374b81
  • Loading branch information
edavis10 committed Sep 17, 2010
1 parent 35dba0f commit ebb445c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ def self.pluginify_sources(type, *sources)
# 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
end

0 comments on commit ebb445c

Please sign in to comment.