diff --git a/lib/jsonapi/resources/railtie.rb b/lib/jsonapi/resources/railtie.rb index 920e88b1..7074aba0 100644 --- a/lib/jsonapi/resources/railtie.rb +++ b/lib/jsonapi/resources/railtie.rb @@ -26,6 +26,10 @@ class Railtie < ::Rails::Railtie 'by setting `warn_on_eager_loading_disabled` to false.' end end + config.to_prepare do + ::JSONAPI::Resource._clear_resource_type_to_klass_cache + ::JSONAPI::Resource._clear_model_to_resource_type_cache + end end end end