Module: ActiveRecordShards::DefaultShard
- Defined in:
- lib/active_record_shards/default_shard.rb
Instance Method Summary collapse
Instance Method Details
#default_shard=(new_default_shard) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/active_record_shards/default_shard.rb', line 5 def default_shard=(new_default_shard) if ars_shard_type?(new_default_shard) ActiveRecordShards::ShardSelection.ars_default_shard = new_default_shard switch_connection(shard: new_default_shard) else super end end |