Commit 3f480438 by Prem Sichanugrist

Re-merge the permission with the same value

`#reverse_merge` did not work as planned because :default key was
already existed in the hash.
parent 6003e543
...@@ -249,8 +249,8 @@ module Paperclip ...@@ -249,8 +249,8 @@ module Paperclip
end end
def set_permissions permissions def set_permissions permissions
permissions = { :default => permissions } unless permissions.respond_to?(:reverse_merge) permissions = { :default => permissions } unless permissions.respond_to?(:merge)
permissions.reverse_merge :default => :public_read permissions.merge :default => (permissions[:default] || :public_read)
end end
def parse_credentials creds def parse_credentials creds
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment