1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix for relative url root in assets

This commit is contained in:
Guillermo Iguaran 2011-09-13 04:27:30 -05:00
parent 536bb7b135
commit f509b6988b

View file

@ -17,7 +17,6 @@ module Sprockets
paths.asset_digests = asset_digests
paths.compile_assets = compile_assets?
paths.digest_assets = digest_assets?
paths.relative_url_root = config.action_controller.relative_url_root
paths
end
end
@ -97,8 +96,7 @@ module Sprockets
end
class AssetPaths < ::ActionView::AssetPaths #:nodoc:
attr_accessor :asset_environment, :asset_prefix, :asset_digests, :compile_assets,
:digest_assets, :relative_url_root
attr_accessor :asset_environment, :asset_prefix, :asset_digests, :compile_assets, :digest_assets
class AssetNotPrecompiledError < StandardError; end
@ -153,7 +151,7 @@ module Sprockets
end
def relative_url_root
has_request? ? super : @relative_url_root
has_request? ? super : config.action_controller.relative_url_root
end
end
end