Class: ActiveVersion::Sharding::ConnectionRouter
- Inherits:
-
Object
- Object
- ActiveVersion::Sharding::ConnectionRouter
- Defined in:
- lib/active_version/sharding/connection_router.rb
Overview
No-op router. Connection routing is application-owned.
Class Method Summary collapse
- .adapter_for(model_class, version_type) ⇒ Object
- .connection_for(model_class, version_type) ⇒ Object
- .with_connection(model_class, version_type, &block) ⇒ Object
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 |