diff options
author | Albert Callarisa Roca <shark234@gmail.com> | 2011-07-08 00:10:20 +0800 |
---|---|---|
committer | Albert Callarisa Roca <shark234@gmail.com> | 2011-07-08 00:10:20 +0800 |
commit | f6a6b51ae551b7f936e974cba3ad4b30422d6804 (patch) | |
tree | 67544eb205101644849952af0e404d3ed99361d4 /actionpack/lib/action_view/asset_paths.rb | |
parent | 298a0834e181c63e5c1165a11efa1f6947b536f2 (diff) | |
download | rails-f6a6b51ae551b7f936e974cba3ad4b30422d6804.tar.gz rails-f6a6b51ae551b7f936e974cba3ad4b30422d6804.tar.bz2 rails-f6a6b51ae551b7f936e974cba3ad4b30422d6804.zip |
Using the sum of bytes instead the hash of the path when replacing the wildcard of the assets path because in ruby 1.9 is not consistent
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 |