active_record_shards 2.4.3 → 2.4.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -103,6 +103,10 @@ module ActiveRecordShards
103
103
  Thread.current[:shard_selection] ||= ShardSelection.new
104
104
  end
105
105
 
106
+ def shard_names
107
+ configurations[shard_env]['shard_names'] || []
108
+ end
109
+
106
110
  private
107
111
 
108
112
  def switch_connection(options)
@@ -119,10 +123,6 @@ module ActiveRecordShards
119
123
  end
120
124
  end
121
125
 
122
- def shard_names
123
- configurations[shard_env]['shard_names'] || []
124
- end
125
-
126
126
  def shard_env
127
127
  @shard_env = defined?(Rails.env) ? Rails.env : RAILS_ENV
128
128
  end