Merge pull request #2114 from kirs/fix-to-prepare-warning

Fix to_prepare warning
This commit is contained in:
Rafael França 2017-04-18 23:57:22 -04:00 committed by GitHub
commit be0b1e8cf9
2 changed files with 4 additions and 3 deletions

View File

@ -12,6 +12,10 @@ module ActiveModel
include app.routes.url_helpers
end
end
config.to_prepare do
ActiveModel::Serializer.serializers_cache.clear
end
end
end

View File

@ -14,9 +14,6 @@ begin
ActionController::Base.send(:include, ::ActionController::Serialization)
ActionController::TestCase.send(:include, ::ActionController::SerializationAssertions)
end
ActionDispatch::Reloader.to_prepare do
ActiveModel::Serializer.serializers_cache.clear
end
end
rescue LoadError
# rails not installed, continuing