diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-07-22 22:11:32 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-09-03 22:59:08 +0200 |
commit | a132229d7b4382d9ffe8847fa58f469cb8f2ecfc (patch) | |
tree | 0ee1db3d25a6d3319ba5f4d575c9c9f39ab6aea9 /actionpack/lib | |
parent | abeb0ff2cc99967b852c509e5d3bd186fa8a184c (diff) | |
download | rails-a132229d7b4382d9ffe8847fa58f469cb8f2ecfc.tar.gz rails-a132229d7b4382d9ffe8847fa58f469cb8f2ecfc.tar.bz2 rails-a132229d7b4382d9ffe8847fa58f469cb8f2ecfc.zip |
Added ability to set asset_path for engines
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/test_request.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers/asset_tag_helper.rb | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/testing/test_request.rb b/actionpack/lib/action_dispatch/testing/test_request.rb index b3e67f6e36..c587a36930 100644 --- a/actionpack/lib/action_dispatch/testing/test_request.rb +++ b/actionpack/lib/action_dispatch/testing/test_request.rb @@ -10,7 +10,7 @@ module ActionDispatch end def initialize(env = {}) - env = Rails.application.env_defaults.merge(env) if defined?(Rails.application) + env = Rails.application.env_config.merge(env) if defined?(Rails.application) super(DEFAULT_ENV.merge(env)) self.host = 'test.host' 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) |