Module: Octopus::Model::SharedMethods
- Included in:
- ClassMethods, InstanceMethods
- Defined in:
- lib/octopus/model.rb
Instance Method Summary collapse
Instance Method Details
#using(shard) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/octopus/model.rb', line 12 def using(shard) if block_given? raise Octopus::Exception, "\#{name}.using is not allowed to receive a block, it works just like a regular scope.\n\nIf you are trying to scope everything to a specific shard, use Octopus.using instead.\n EOF\n end\n\n if Octopus.enabled?\n Octopus::ScopeProxy.new(shard, self)\n else\n self\n end\nend\n" |