Skip to content

Instantly share code, notes, and snippets.

@alanho
Created July 23, 2010 14:54
Show Gist options
  • Save alanho/487540 to your computer and use it in GitHub Desktop.
Save alanho/487540 to your computer and use it in GitHub Desktop.
#place this inside config/initializers/
require 'oauth/request_proxy/typhoeus_request'
module OAuthFix
def self.included(base)
base.send :include, InstanceMethods
base.module_eval %q{
alias_method :old_post_parameters, :post_parameters
alias_method :post_parameters, :fixed_post_parameters
}
end
module InstanceMethods
def fixed_post_parameters
if(method == 'POST')
request.params || {}
else
{}
end
end
end
end
OAuth::RequestProxy::Typhoeus::Request.send :include, OAuthFix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment