aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2010-07-22 22:11:32 +0200
committerPiotr Sarnacki <drogus@gmail.com>2010-09-03 22:59:08 +0200
commita132229d7b4382d9ffe8847fa58f469cb8f2ecfc (patch)
tree0ee1db3d25a6d3319ba5f4d575c9c9f39ab6aea9 /actionpack/lib/action_view
parentabeb0ff2cc99967b852c509e5d3bd186fa8a184c (diff)
downloadrails-a132229d7b4382d9ffe8847fa58f469cb8f2ecfc.tar.gz
rails-a132229d7b4382d9ffe8847fa58f469cb8f2ecfc.tar.bz2
rails-a132229d7b4382d9ffe8847fa58f469cb8f2ecfc.zip
Added ability to set asset_path for engines
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/asset_tag_helper.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
index a3c43d3e93..3329a8b368 100644
--- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -727,6 +727,9 @@ module ActionView
source += ".#{ext}" if rewrite_extension?(source, dir, ext)
source = "/#{dir}/#{source}" unless source[0] == ?/
+ if controller.respond_to?(:env) && controller.env["action_dispatch.asset_path"]
+ source = rewrite_asset_path(source, controller.env["action_dispatch.asset_path"])
+ end
source = rewrite_asset_path(source, config.asset_path)
has_request = controller.respond_to?(:request)