diff options
author | Andrew White <pixeltrix@users.noreply.github.com> | 2014-07-15 09:32:01 +0100 |
---|---|---|
committer | Andrew White <pixeltrix@users.noreply.github.com> | 2014-07-15 09:32:01 +0100 |
commit | c3f4d6c8feafab9ded8b549d745c4731ee17b5c4 (patch) | |
tree | ddfcde5e00a7982cf3c8935868a811509e9cb8d2 /actionview/lib/action_view | |
parent | 942b3a243403ae20b531ca5a77fcceda9fe6524d (diff) | |
parent | d005777469b7182b1a8f657a5b94363b321bef5d (diff) | |
download | rails-c3f4d6c8feafab9ded8b549d745c4731ee17b5c4.tar.gz rails-c3f4d6c8feafab9ded8b549d745c4731ee17b5c4.tar.bz2 rails-c3f4d6c8feafab9ded8b549d745c4731ee17b5c4.zip |
Merge pull request #16161 from jpawlyn/master
Fix empty host for an asset url when asset_host proc returns nil
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r-- | actionview/lib/action_view/helpers/asset_url_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/asset_url_helper.rb b/actionview/lib/action_view/helpers/asset_url_helper.rb index 469f7c16bd..9e8d005ec7 100644 --- a/actionview/lib/action_view/helpers/asset_url_helper.rb +++ b/actionview/lib/action_view/helpers/asset_url_helper.rb @@ -203,7 +203,6 @@ module ActionView request = self.request if respond_to?(:request) host = options[:host] host ||= config.asset_host if defined? config.asset_host - host ||= request.base_url if request && options[:protocol] == :request if host.respond_to?(:call) arity = host.respond_to?(:arity) ? host.arity : host.method(:call).arity @@ -214,6 +213,7 @@ module ActionView host = host % (Zlib.crc32(source) % 4) end + host ||= request.base_url if request && options[:protocol] == :request return unless host if host =~ URI_REGEXP |