Sha256: 189c9f5e155b2181b98fe2d36bbfe4e51197a55807e2e13414d3a46da82d8bba
Contents?: true
Size: 437 Bytes
Versions: 20
Compression:
Stored size: 437 Bytes
Contents
module ConnectionHelper def run_without_connection original_connection = ActiveRecord::Base.remove_connection yield original_connection ensure ActiveRecord::Base.establish_connection(original_connection) end # Used to drop all cache query plans in tests. def reset_connection original_connection = ActiveRecord::Base.remove_connection ActiveRecord::Base.establish_connection(original_connection) end end
Version data entries
20 entries across 20 versions & 3 rubygems