Skip to content

Instantly share code, notes, and snippets.

@ashaw
Created December 16, 2010 04:57
Show Gist options
  • Save ashaw/743049 to your computer and use it in GitHub Desktop.
Save ashaw/743049 to your computer and use it in GitHub Desktop.
module ActiveRecord
class StatementInvalid < ActiveRecordError
def new(msg)
super unless msg =~ /MySQL server has gone away/
ActiveRecord::Base.verify_active_connections!
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment