Skip to content

Instantly share code, notes, and snippets.

@jadehopepunk
Created April 4, 2013 23:20
Show Gist options
  • Save jadehopepunk/5315242 to your computer and use it in GitHub Desktop.
Save jadehopepunk/5315242 to your computer and use it in GitHub Desktop.
module OpenURI
class <<self
alias_method :open_uri_original, :open_uri
def self.open_uri(name, options = {})
defaults = {:allow_redirections => :safe}
self.open_uri_original(name, defaults.merge(options))
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment