Module: RailsSQLPrettifier::NiceQLConfigExt

Extended by:
ActiveSupport::Concern
Included in:
RailsSQLPrettifier
Defined in:
lib/rails_sql_prettifier.rb

Instance Method Summary collapse

Instance Method Details

#ar_using_pg_adapter?Boolean

Returns:

  • (Boolean)

58
59
60
# File 'lib/rails_sql_prettifier.rb', line 58

def ar_using_pg_adapter?
  ActiveRecord::Base.connection_db_config.adapter == 'postgresql'
end

#initializeObject


62
63
64
65
66
67
# File 'lib/rails_sql_prettifier.rb', line 62

def initialize
  super
  self.pg_adapter_with_nicesql = false
  self.prettify_active_record_log_output = false
  self.prettify_pg_errors = ar_using_pg_adapter?
end