Skip to content

Commit

Permalink
fix: add railtie to clear cache after class changes
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkiczula committed Feb 8, 2024
1 parent 07888a9 commit 8c8fd2a
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 8c8fd2a

Please sign in to comment.