Commit 6003e543 by Prem Sichanugrist

Revise `:respond_to?` duck typing check

Actually trying to check what's being used in the method instead of
checking for something and use another thing. Thanks @jferris.
parent 5840b757
...@@ -249,9 +249,8 @@ module Paperclip ...@@ -249,9 +249,8 @@ module Paperclip
end end
def set_permissions permissions def set_permissions permissions
permissions = { :default => permissions } unless permissions.respond_to?(:merge) permissions = { :default => permissions } unless permissions.respond_to?(:reverse_merge)
permissions[:default] ||= :public_read permissions.reverse_merge :default => :public_read
permissions
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