module Niceql::AbstractAdapterLogPrettifier

Public Instance Methods

log( sql, *args, &block ) click to toggle source
Calls superclass method
# File lib/niceql.rb, line 222
def log( sql, *args, &block )
  # \n need to be placed because AR log will start with action description + time info.
  # rescue sql - just to be sure Prettifier wouldn't break production
  formatted_sql = "\n" + Prettifier.prettify_sql(sql) rescue sql
  super( formatted_sql, *args, &block )
end