diff options
author | José Valim <jose.valim@gmail.com> | 2011-05-24 08:15:25 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-05-24 08:15:25 -0700 |
commit | b8655768734140b0f5ef0e91f5233876bb117847 (patch) | |
tree | 9fa9a3bedfd48a4a851251b492d53b9d3991193e | |
parent | 408bbdcda15a5086033d78edc56fb364d88af368 (diff) | |
parent | 15baa498710abe5914ae6938827df717696868b8 (diff) | |
download | rails-b8655768734140b0f5ef0e91f5233876bb117847.tar.gz rails-b8655768734140b0f5ef0e91f5233876bb117847.tar.bz2 rails-b8655768734140b0f5ef0e91f5233876bb117847.zip |
Merge pull request #1268 from ernie/compute_asset_host_fix
Redundant condition in compute_asset_host is redundant.
-rw-r--r-- | actionpack/lib/action_view/helpers/asset_paths.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_paths.rb b/actionpack/lib/action_view/helpers/asset_paths.rb index 38810eea2e..1bc5c9e003 100644 --- a/actionpack/lib/action_view/helpers/asset_paths.rb +++ b/actionpack/lib/action_view/helpers/asset_paths.rb @@ -55,11 +55,11 @@ module ActionView # Pick an asset host for this source. Returns +nil+ if no host is set, # the host if no wildcard is set, the host interpolated with the # numbers 0-3 if it contains <tt>%d</tt> (the number is the source hash mod 4), - # or the value returned from invoking the proc if it's a proc or the value from - # invoking call if it's an object responding to call. + # or the value returned from invoking call on an object responding to call + # (proc or otherwise). def compute_asset_host(source) if host = config.asset_host - if host.is_a?(Proc) || host.respond_to?(:call) + if host.respond_to?(:call) case host.is_a?(Proc) ? host.arity : host.method(:call).arity when 2 request = controller.respond_to?(:request) && controller.request |