Relative_url_root in Engines::RailsExtensions::AssetHelpers.plugin_asset_path


I have a rails app (redmine) running within a sub-uri via the following
directive in environment.rb:

ActionController::AbstractRequest.relative_url_root = “/redmine”

Unfortunately, URLs generated for plugin assets by Engines do not honor
this directive. I don’t know Rails, but it seems like an easy fix if you
know how to get at the request object from within Engines. I was
thinking of something along these lines:

— vendor/plugins/engines/lib/engines/rails_extensions/asset_helpers.rb
(revision 2796)
+++ vendor/plugins/engines/lib/engines/rails_extensions/asset_helpers.rb
(working copy)
@@ -109,5 +109,5 @@

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?


Can someone point me in the right direction?



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs