28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/rails_sql_prettifier/nice_ql_config_ext.rb', line 28
def configure
super
if config.pg_adapter_with_nicesql &&
defined?(::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter) && !protected_env?
::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.include(PostgresAdapterNiceQL)
end
if config.prettify_active_record_log_output
::ActiveRecord::ConnectionAdapters::AbstractAdapter.prepend(AbstractAdapterLogPrettifier)
end
if config.prettify_pg_errors && config.ar_using_pg_adapter?
::ActiveRecord::StatementInvalid.include(NiceqlError)
end
end
|