Class: ActiveRecord::ConnectionAdapters::AbstractAdapter
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::AbstractAdapter
- Defined in:
- lib/fresh_connection/active_record/abstract_adapter.rb
Instance Method Summary collapse
Instance Method Details
#select_all_with_slave_connection(arel, name = nil, binds = []) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/fresh_connection/active_record/abstract_adapter.rb', line 4 def select_all_with_slave_connection(arel, name = nil, binds = []) if FreshConnection::SlaveConnection.slave_access? change_connection {select_all_without_slave_connection(arel, "[slave] #{name}", binds)} else select_all_without_slave_connection(arel, name, binds) end end |