diff options
author | José Valim <jose.valim@gmail.com> | 2011-07-07 12:15:36 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-07-07 12:15:36 -0700 |
commit | 453f2221cbe65b38b074338f5b15858c83147e5f (patch) | |
tree | cf836bfd9a724a8974858e241efc5d35e9a0552e /actionpack/lib/action_view/asset_paths.rb | |
parent | 99c20aaa753f5d333ea34bba9495b06dc0d90413 (diff) | |
parent | f6a6b51ae551b7f936e974cba3ad4b30422d6804 (diff) | |
download | rails-453f2221cbe65b38b074338f5b15858c83147e5f.tar.gz rails-453f2221cbe65b38b074338f5b15858c83147e5f.tar.bz2 rails-453f2221cbe65b38b074338f5b15858c83147e5f.zip |
Merge pull request #2005 from acroca/master
Fixing asset number for asset_path with %d to be consistent in ruby 1.9
Diffstat (limited to 'actionpack/lib/action_view/asset_paths.rb')
-rw-r--r-- | actionpack/lib/action_view/asset_paths.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/asset_paths.rb b/actionpack/lib/action_view/asset_paths.rb index 4dd02755d3..77a8c5322f 100644 --- a/actionpack/lib/action_view/asset_paths.rb +++ b/actionpack/lib/action_view/asset_paths.rb @@ -111,7 +111,8 @@ module ActionView args << current_request if (arity > 1 || arity < 0) && has_request? host.call(*args) else - (host =~ /%d/) ? host % (source.hash % 4) : host + source_num = source.bytes.sum + (host =~ /%d/) ? host % (source_num % 4) : host end end end |