Module: Octopus::CollectionProxy
- Defined in:
- lib/octopus/collection_proxy.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/octopus/collection_proxy.rb', line 3 def self.included(base) base.send(:include, Octopus::ShardTracking::Dynamic) base.sharded_methods :any?, :build, :count, :create, :create!, :concat, :delete, :delete_all, :destroy, :destroy_all, :empty?, :find, :first, :include?, :last, :length, :many?, :pluck, :replace, :select, :size, :sum, :to_a, :uniq end |
Instance Method Details
#current_shard ⇒ Object
10 11 12 |
# File 'lib/octopus/collection_proxy.rb', line 10 def current_shard @association.owner.current_shard end |