diff options
Diffstat (limited to 'railties/lib/rails/application')
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 6d68eea220..6d89caf514 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -44,7 +44,7 @@ module Rails @railties_order = [:all] @relative_url_root = ENV["RAILS_RELATIVE_URL_ROOT"] @reload_classes_only_on_change = true - @file_watcher = (defined?(Listen) && Listen::Adapter.select()!=Listen::Adapter::Polling)? ActiveSupport::FileEventedUpdateChecker : ActiveSupport::FileUpdateChecker + @file_watcher = file_update_checker @exceptions_app = nil @autoflush_log = true @log_formatter = ActiveSupport::Logger::SimpleFormatter.new @@ -181,6 +181,14 @@ module Rails end private + def file_update_checker + if defined?(Listen) && Listen::Adapter.select() != Listen::Adapter::Polling + ActiveSupport::FileEventedUpdateChecker + else + ActiveSupport::FileUpdateChecker + end + end + class Custom #:nodoc: def initialize @configurations = Hash.new |