Skip to content

Instantly share code, notes, and snippets.

@albanpeignier
Created October 27, 2012 10:33
Show Gist options
  • Save albanpeignier/3964087 to your computer and use it in GitHub Desktop.
Save albanpeignier/3964087 to your computer and use it in GitHub Desktop.
HTTParty::Response doesn't like tap
response = self.class.post(...)
response.error! unless response.success?
response
self.class.post(...) do |response|
response.error! unless response.success? # NoMethodError
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment