Skip to content

Commit

Permalink
Fix error handling configuration path when configuration file doesn't…
Browse files Browse the repository at this point in the history
… exist

fixes #73
  • Loading branch information
gussan committed Jan 29, 2018
1 parent 69a7ced commit 5c318f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/active_record/turntable/railtie.rb
Expand Up @@ -21,9 +21,10 @@ class Railtie < Rails::Railtie
path = app.paths["config/turntable"].existent.first
self.turntable_configuration_file = path

if File.exist?(path)
if path
reset_turntable_configuration(Configuration.load(turntable_configuration_file, Rails.env))
else
# FIXME: suppress this warning during rails g turntable:install
warn("[activerecord-turntable] config/turntable.{rb,yml} is not found. skipped initliazing cluster.")
end
end
Expand Down

0 comments on commit 5c318f0

Please sign in to comment.