Module: Octopus::CollectionAssociation

Defined in:
lib/octopus/collection_association.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/octopus/collection_association.rb', line 3

def self.included(base)
  if Octopus.rails51? || Octopus.rails52?
    base.sharded_methods :reader, :writer, :ids_reader, :ids_writer, :create, :create!,
                         :build, :include?,
                         :load_target, :reload, :size, :select
  else
    base.sharded_methods :reader, :writer, :ids_reader, :ids_writer, :create, :create!,
                         :build, :any?, :count, :empty?, :first, :include?, :last, :length,
                         :load_target, :many?, :reload, :size, :select, :uniq
  end
end