module Rails::Sharding::ActiveRecordExtensions::ScopeMethods
Public Instance Methods
using_shard(shard_group, shard_name)
click to toggle source
# File lib/rails/sharding/active_record_extensions.rb, line 29 def using_shard(shard_group, shard_name) if block_given? raise Errors::WrongUsageError, "#{name}.using is not allowed to receive a block, it works just like a regular scope.\nIf you are trying to scope everything to a specific shard, use Shards::Core.using_shard instead." end ScopeProxy.new(shard_group, shard_name, self) end