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
end
def set_permissions permissions
permissions = { :default => permissions } unless permissions.respond_to?(:merge)
permissions[:default] ||= :public_read
permissions
permissions = { :default => permissions } unless permissions.respond_to?(:reverse_merge)
permissions.reverse_merge :default => :public_read
end
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