diff --git a/lib/apipie/application.rb b/lib/apipie/application.rb index 422efc60f..c70b67224 100644 --- a/lib/apipie/application.rb +++ b/lib/apipie/application.rb @@ -424,10 +424,10 @@ def ignored?(controller, method = nil) # as this would break loading of the controllers. def rails_mark_classes_for_reload unless Rails.application.config.cache_classes - Rails.application.reloader.reload! + Rails::VERSION::MAJOR == 4 ? ActionDispatch::Reloader.cleanup! : Rails.application.reloader.reload! init_env reload_examples - Rails.application.reloader.prepare! + Rails::VERSION::MAJOR == 4 ? ActionDispatch::Reloader.prepare! : Rails.application.reloader.prepare! end end