Module: Octopus::ShardTracking::Attribute
- Included in:
- RelationProxy, Octopus::ScopeProxy
- Defined in:
- lib/octopus/shard_tracking/attribute.rb
Overview
Adds current_shard as an attribute; provide a default implementation of set_current_shard which considers only the current ActiveRecord::Base.connection_proxy
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 8 9 |
# File 'lib/octopus/shard_tracking/attribute.rb', line 5 def self.included(base) base.send(:include, Octopus::ShardTracking) base.extend(ClassMethods) base.track_current_shard_as_attribute end |