Not that important, but to my knowledge you are not required to call ActiveRecord::Base.connection.execute but can instead call execute on self. The same should be true for quote_table_name and quote.