Sha256: 6c66cfae53156ac1a4e7531d99e6d6d231f894d0e3c21c977efc2b1d29422c52
Contents?: true
Size: 697 Bytes
Versions: 22
Compression:
Stored size: 697 Bytes
Contents
begin require 'acts_as_archive' # acts_as_archive extension class ActsAsArchive class << self # @note use the same shard which `from` shard using def move_with_turntable(config, where, merge_options={}) if [config[:to], config[:from]].all? { |k| k.try(:turntable_enabled?) } current_shard = config[:from].connection.current_shard.name.to_sym config[:to].connection.with_shard(current_shard) { move_without_turntable(config, where, merge_options) } else move_without_turntable(config, where, merge_options) end end alias_method_chain :move, :turntable end end rescue LoadError end
Version data entries
22 entries across 22 versions & 1 rubygems