Skip to content
Browse files

Re-merge the permission with the same value

`#reverse_merge` did not work as planned because :default key was
already existed in the hash.
  • Loading branch information...
1 parent 6003e54 commit 3f480438f8def4c2d13b358fe2ad37cee0448892 @sikachu sikachu committed Jun 8, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/paperclip/storage/s3.rb
View
4 lib/paperclip/storage/s3.rb
@@ -249,8 +249,8 @@ def http_proxy_password
end
def set_permissions permissions
- permissions = { :default => permissions } unless permissions.respond_to?(:reverse_merge)
- permissions.reverse_merge :default => :public_read
+ permissions = { :default => permissions } unless permissions.respond_to?(:merge)
+ permissions.merge :default => (permissions[:default] || :public_read)
end
def parse_credentials creds

0 comments on commit 3f48043

Please sign in to comment.
Something went wrong with that request. Please try again.