Class: ActiveRecord::ConnectionAdapters::AbstractAdapter
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::AbstractAdapter
- Defined in:
- lib/active_record/connection_adapters/master_slave_adapter.rb
Direct Known Subclasses
Instance Method Summary collapse
- #log(sql, name = 'SQL', *args, &block) ⇒ Object
- #log_info(sql, name, ms) ⇒ Object
-
#orig_log ⇒ Object
ActiveRecord v3.x.
-
#orig_log_info ⇒ Object
ActiveRecord v2.x.
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_log ⇒ Object
ActiveRecord v3.x
87 |
# File 'lib/active_record/connection_adapters/master_slave_adapter.rb', line 87 alias_method :orig_log, :log |
#orig_log_info ⇒ Object
ActiveRecord v2.x
81 |
# File 'lib/active_record/connection_adapters/master_slave_adapter.rb', line 81 alias_method :orig_log_info, :log_info |