Skip to content

Commit

Permalink
Update error wording
Browse files Browse the repository at this point in the history
We are no longer exclusively using yml for config. Update the wording of the
error message to reflect this.
  • Loading branch information
jacobat committed Oct 12, 2017
1 parent 31f314d commit 5cab63a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/active_record_shards/connection_switcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def current_shard_id

def shard_names
unless config = configurations[shard_env]
raise "Did not find #{shard_env} in configurations, did you forget to add it to your database.yml ? (configurations: #{configurations.inspect})"
raise "Did not find #{shard_env} in configurations, did you forget to add it to your database config ? (configurations: #{configurations.inspect})"
end
unless config[SHARD_NAMES_CONFIG_KEY]
raise "No shards configured for #{shard_env}"
Expand All @@ -155,7 +155,7 @@ def switch_connection(options)
if options.any?
if options.key?(:shard)
unless config = configurations[shard_env]
raise "Did not find #{shard_env} in configurations, did you forget to add it to your database.yml ? (configurations: #{configurations.inspect})"
raise "Did not find #{shard_env} in configurations, did you forget to add it to your database config ? (configurations: #{configurations.inspect})"
end
unless shard = config['shard_names'].include?(options[:shard])
raise "Did not find shard #{options[:shard]} in configurations"
Expand Down

0 comments on commit 5cab63a

Please sign in to comment.