FEATURE: Make the multisite config path configurable (#22)

FEATURE: Make the multisite config path configurable (#22)

diff --git a/lib/rails_multisite/railtie.rb b/lib/rails_multisite/railtie.rb
index dddf8e6..96bfcb0 100644
--- a/lib/rails_multisite/railtie.rb
+++ b/lib/rails_multisite/railtie.rb
@@ -9,9 +9,14 @@ module RailsMultisite
     initializer "RailsMultisite.init" do |app|
       app.config.multisite = false
 
-      config_file = ConnectionManagement.default_config_filename
+      config_file =
+        app.config.respond_to?(:multisite_config_path) &&
+        app.config.multisite_config_path.presence
+
+      config_file ||= ConnectionManagement.default_config_filename
+
       if File.exist?(config_file)
-        ConnectionManagement.config_filename = ConnectionManagement.default_config_filename
+        ConnectionManagement.config_filename = config_file
         app.config.multisite = true
         Rails.logger.formatter = RailsMultisite::Formatter.new
 

GitHub sha: 070ebbadb31bd48b0efc1ffae76dcf3b5a98a5db

This commit appears in #22 which was approved by eviltrout. It was merged by danielwaterworth.