From da7f0426ec7b0aa053489633c2a8a3da6423654f Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Wed, 14 Sep 2011 14:47:49 -0700 Subject: Allow asset tag helper methods to accept :digest => false option in order to completely avoid the digest generation. --- actionpack/lib/action_view/asset_paths.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'actionpack/lib/action_view/asset_paths.rb') diff --git a/actionpack/lib/action_view/asset_paths.rb b/actionpack/lib/action_view/asset_paths.rb index 75164b8134..cf30ad7e57 100644 --- a/actionpack/lib/action_view/asset_paths.rb +++ b/actionpack/lib/action_view/asset_paths.rb @@ -21,14 +21,15 @@ module ActionView # When :relative (default), the protocol will be determined by the client using current protocol # When :request, the protocol will be the request protocol # Otherwise, the protocol is used (E.g. :http, :https, etc) - def compute_public_path(source, dir, ext = nil, include_host = true, protocol = nil) + def compute_public_path(source, dir, options = {}) source = source.to_s return source if is_uri?(source) - source = rewrite_extension(source, dir, ext) if ext - source = rewrite_asset_path(source, dir) + options[:include_host] ||= true + source = rewrite_extension(source, dir, options[:ext]) if options[:ext] + source = rewrite_asset_path(source, dir, options) source = rewrite_relative_url_root(source, relative_url_root) - source = rewrite_host_and_protocol(source, protocol) if include_host + source = rewrite_host_and_protocol(source, options[:protocol]) if options[:include_host] source end -- cgit v1.2.3