Skip to content

Instantly share code, notes, and snippets.

@maxy
Created July 14, 2014 06:07
Show Gist options
  • Save maxy/0fdd74a9f6c27c14cda0 to your computer and use it in GitHub Desktop.
Save maxy/0fdd74a9f6c27c14cda0 to your computer and use it in GitHub Desktop.
Set PG::PQERRORS_VERBOSE on pg connection instance for ActiveRecord
module ActiveRecord
module ConnectionAdapters
alias_method :base_configure_connection, :configure_connection
def configure_connection
valiables = base_configure_connection
@connection.set_error_verbosity(PG::PQERRORS_VERBOSE)
valiables
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment