Skip to content

Commit

Permalink
Use AD::Reloader on Rails 4, app.reloader only on Rails 5+
Browse files Browse the repository at this point in the history
  • Loading branch information
domcleal committed Apr 26, 2017
1 parent e8e3bd3 commit ddf03d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/apipie/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ddf03d4

Please sign in to comment.