Created
February 13, 2010 21:49
-
-
Save thbar/303681 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# here's what I used to get HopToad to work with Rails Metal | |
class Gateway | |
def self.call(env) | |
begin | |
# fake error trigger | |
if env["PATH_INFO"] =~ /^\/push\/error/ | |
puts "Raising..." | |
raise "Test error!" | |
end | |
# ... | |
rescue => e | |
HoptoadNotifier.notify(e, {}) | |
ensure | |
ActiveRecord::Base.clear_active_connections! | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment