Skip to content

Commit bb00bbd

Browse files
authored
fix: add railtie to clear cache after class changes (#1448)
1 parent 07888a9 commit bb00bbd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/jsonapi/resources/railtie.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ class Railtie < ::Rails::Railtie
2626
'by setting `warn_on_eager_loading_disabled` to false.'
2727
end
2828
end
29+
config.to_prepare do
30+
::JSONAPI::Resource._clear_resource_type_to_klass_cache
31+
::JSONAPI::Resource._clear_model_to_resource_type_cache
32+
end
2933
end
3034
end
3135
end

0 commit comments

Comments
 (0)