Skip to content
Browse files

Fix asset_path relative_url_root method

  • Loading branch information...
1 parent 874e012 commit a244ad4cebdb238abfc3e6c5db556d878085c426 @spastorino spastorino committed Sep 13, 2011
Showing with 5 additions and 7 deletions.
  1. +5 −3 actionpack/lib/action_view/asset_paths.rb
  2. +0 −4 actionpack/lib/sprockets/helpers/rails_helper.rb
View
8 actionpack/lib/action_view/asset_paths.rb
@@ -119,9 +119,11 @@ def compute_asset_host(source)
end
def relative_url_root
- config = controller.config if controller.respond_to?(:config)
- config ||= config.action_controller if config.action_controller.present?
- config.relative_url_root
+ if config.action_controller.present?
+ config.action_controller.relative_url_root
+ else
+ config.relative_url_root
+ end
end
def asset_host_config
View
4 actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -154,10 +154,6 @@ def rewrite_extension(source, dir, ext)
source
end
end
-
- def relative_url_root
- has_request? ? super : config.action_controller.relative_url_root
- end
end
end
end

0 comments on commit a244ad4

Please sign in to comment.
Something went wrong with that request. Please try again.