Module: ActiveRecordShards::Model::InstanceMethods
- Defined in:
 - lib/active_record_shards/model.rb
 
Instance Method Summary collapse
Instance Method Details
#from_replica? ⇒ Boolean
      61 62 63  | 
    
      # File 'lib/active_record_shards/model.rb', line 61 def from_replica? @from_replica end  | 
  
#from_shard ⇒ Object
      65 66 67  | 
    
      # File 'lib/active_record_shards/model.rb', line 65 def from_shard @from_shard end  | 
  
#initialize_shard_and_replica ⇒ Object
      56 57 58 59  | 
    
      # File 'lib/active_record_shards/model.rb', line 56 def initialize_shard_and_replica @from_replica = !!self.class.current_shard_selection.[:replica] @from_shard = self.class.current_shard_selection.[:shard] end  |