Class: ActiveRecord::ConnectionAdapters::AbstractAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/active_record/connection_adapters/master_slave_adapter.rb

Instance Method Summary collapse

Instance Method Details

#log(sql, name = 'SQL', *args, &block) ⇒ Object



88
89
90
# File 'lib/active_record/connection_adapters/master_slave_adapter.rb', line 88

def log(sql, name = 'SQL', *args, &block)
  orig_log(sql, "[#{connection_info}] #{name || 'SQL'}", *args, &block)
end

#log_info(sql, name, ms) ⇒ Object



82
83
84
# File 'lib/active_record/connection_adapters/master_slave_adapter.rb', line 82

def log_info(sql, name, ms)
  orig_log_info(sql, "[#{connection_info}] #{name || 'SQL'}", ms)
end

#orig_logObject

ActiveRecord v3.x



87
# File 'lib/active_record/connection_adapters/master_slave_adapter.rb', line 87

alias_method :orig_log, :log

#orig_log_infoObject

ActiveRecord v2.x



81
# File 'lib/active_record/connection_adapters/master_slave_adapter.rb', line 81

alias_method :orig_log_info, :log_info