Module: ConnectionManager::UsingQueryMethod
- Defined in:
- lib/connection_manager/using.rb
Instance Method Summary collapse
Instance Method Details
#using(connection_class_name) ⇒ Object
71 72 73 74 75 76 77 |
# File 'lib/connection_manager/using.rb', line 71 def using(connection_class_name) d = klass.using(connection_class_name) relation = clone relation.instance_variable_set(:@klass, d.klass) relation = relation.from(d.quoted_table_name) unless (ActiveRecord::VERSION::MAJOR == 3 && ActiveRecord::VERSION::MINOR == 0) relation end |