module Switchman::ActiveRecord::Association
Public Instance Methods
build_record(*args)
click to toggle source
Calls superclass method
# File lib/switchman/active_record/association.rb, line 10 def build_record(*args) shard.activate { super } end
load_target()
click to toggle source
Calls superclass method
# File lib/switchman/active_record/association.rb, line 14 def load_target shard.activate { super } end
scope()
click to toggle source
Calls superclass method
# File lib/switchman/active_record/association.rb, line 18 def scope shard_value = @reflection.options[:multishard] ? @owner : shard @owner.shard.activate { super.shard(shard_value, :association) } end
shard()
click to toggle source
# File lib/switchman/active_record/association.rb, line 6 def shard reflection.shard(owner) end