Skip to content

Commit

Permalink
fix: add railtie to clear cache after class changes (#1448)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkiczula authored and lgebhardt committed Apr 18, 2024
1 parent e55371a commit fa3e059
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/jsonapi/resources/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit fa3e059

Please sign in to comment.