Only put option when there is a value. (Causes errors with Netflix API).

This commit is contained in:
Steeve Morin 2011-09-27 18:32:38 +03:00
parent b627133129
commit c75b82d392

View file

@ -66,7 +66,7 @@ module SimpleOAuth
end
def attributes
ATTRIBUTE_KEYS.inject({}){|a,k| options.key?(k) ? a.merge(:"oauth_#{k}" => options[k]) : a }
ATTRIBUTE_KEYS.inject({}){|a,k| options.key?(k) and options[k] ? a.merge(:"oauth_#{k}" => options[k]) : a }
end
def signature