FileUpdateChecker specifies the API used by Rails to watch files and control reloading. The API depends on four methods:
initialize which expects two parameters and one block as described below.
updated? which returns a boolean if there were updates in the filesystem or not.
execute_if_updated which just executes the block if it was updated.
i18n_reloader = ActiveSupport::FileUpdateChecker.new(paths) do I18n.reload! end ActionDispatch::Reloader.to_prepare do i18n_reloader.execute_if_updated end