blob: fa40a464996692aa2ee2017d70b806d15a9b3e59 (
plain) (
blame)
1
2
3
4
5
6
7
8
|
module PostgresqlHelper
# Make sure to drop all cached query plans to prevent invalid reference errors like:
# cache lookup failed for type XYZ
def reset_pg_session
original_connection = ActiveRecord::Base.remove_connection
ActiveRecord::Base.establish_connection(original_connection)
end
end
|