Class: ActiveVersion::Sharding::ConnectionRouter

Inherits:
Object
  • Object
show all
Defined in:
lib/active_version/sharding/connection_router.rb

Overview

No-op router. Connection routing is application-owned.

Class Method Summary collapse

Class Method Details

.adapter_for(model_class, version_type) ⇒ Object



10
11
12
# File 'lib/active_version/sharding/connection_router.rb', line 10

def adapter_for(model_class, version_type)
  ActiveVersion.adapter_for(model_class, version_type)
end

.connection_for(model_class, version_type) ⇒ Object



6
7
8
# File 'lib/active_version/sharding/connection_router.rb', line 6

def connection_for(model_class, version_type)
  :default
end

.with_connection(model_class, version_type, &block) ⇒ Object



14
15
16
# File 'lib/active_version/sharding/connection_router.rb', line 14

def with_connection(model_class, version_type, &block)
  ActiveVersion.with_connection(model_class, version_type, &block)
end