7 8 9 10 11 12 13 14
# File 'lib/switchman/active_record/reflection.rb', line 7 def shard(owner) if polymorphic? || klass.shard_category == owner.class.shard_category # polymorphic associations assume the same shard as the owning item owner.shard else Shard.default end end