Module: Octopus::Association

Defined in:
lib/octopus/association.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
6
# File 'lib/octopus/association.rb', line 3

def self.included(base)
  base.send(:include, Octopus::ShardTracking::Dynamic)
  base.sharded_methods :target_scope
end

Instance Method Details

#current_shardObject



8
9
10
# File 'lib/octopus/association.rb', line 8

def current_shard
  owner.current_shard
end