1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Use the file watcher defined by the app config

This can make use of the FileEventedUpdateChecker, if available.
This commit is contained in:
Dharam Gollapudi 2015-11-11 14:08:44 -08:00
parent 18b44ff1e4
commit ea3b6ac6ca

View file

@ -56,7 +56,7 @@ module I18n
I18n.enforce_available_locales = enforce_available_locales
directories = watched_dirs_with_extensions(reloadable_paths)
reloader = ActiveSupport::FileUpdateChecker.new(I18n.load_path.dup, directories) do
reloader = app.config.file_watcher.new(I18n.load_path.dup, directories) do
I18n.load_path.keep_if { |p| File.exist?(p) }
I18n.load_path |= reloadable_paths.map(&:existent).flatten