From c75b82d39256f52d39e434f348e05f5c94b198cd Mon Sep 17 00:00:00 2001 From: Steeve Morin Date: Tue, 27 Sep 2011 18:32:38 +0300 Subject: [PATCH] Only put option when there is a value. (Causes errors with Netflix API). --- lib/simple_oauth/header.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/simple_oauth/header.rb b/lib/simple_oauth/header.rb index 5d81a75..e824fc5 100644 --- a/lib/simple_oauth/header.rb +++ b/lib/simple_oauth/header.rb @@ -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