Skip to content

Instantly share code, notes, and snippets.

@mulder
Created March 20, 2012 11:21
Show Gist options
  • Save mulder/2134218 to your computer and use it in GitHub Desktop.
Save mulder/2134218 to your computer and use it in GitHub Desktop.
Patch Mysql2 Adapter for AR so that we don't show tables every other request
unless Rails.env.development?
require "active_record/connection_adapters/mysql2_adapter"
module ActiveRecord
module ConnectionAdapters
class Mysql2Adapter < AbstractAdapter
extend ActiveSupport::Memoizable
memoize :tables, :pk_and_sequence_for, :columns
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment