Module: ActiveRecordShards::Model::InstanceMethods
- Defined in:
- lib/active_record_shards/model.rb
Instance Method Summary collapse
Instance Method Details
#from_shard ⇒ Object
46 47 48 |
# File 'lib/active_record_shards/model.rb', line 46 def from_shard @from_shard end |
#from_slave? ⇒ Boolean
42 43 44 |
# File 'lib/active_record_shards/model.rb', line 42 def from_slave? @from_slave end |
#initialize_shard_and_slave ⇒ Object
37 38 39 40 |
# File 'lib/active_record_shards/model.rb', line 37 def initialize_shard_and_slave @from_slave = !!self.class.current_shard_selection.[:slave] @from_shard = self.class.current_shard_selection.[:shard] end |