fix: treat empty polymorphic configuration as unset - #538
Merged
jkeen merged 2 commits intoAug 9, 2026
Conversation
alloutflo
marked this pull request as ready for review
August 9, 2026 13:13
jkeen
pushed a commit
that referenced
this pull request
Aug 9, 2026
Collaborator
|
Thanks @alloutflo! |
Contributor
|
🎉 This PR is included in version 1.13.3 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
github-actions Bot
pushed a commit
that referenced
this pull request
Aug 9, 2026
# [2.0.0-beta.6](v2.0.0-beta.5...v2.0.0-beta.6) (2026-08-09) ### Bug Fixes * reject invalid page parameters ([#537](#537)) ([bb3698b](bb3698b)), closes [#347](#347) * treat empty polymorphic configuration as unset ([#538](#538)) ([5c17899](5c17899)), closes [#199](#199) ### Features * Add graphiti:audit task to audit resources for issues ([84436ea](84436ea)) * raise MissingRelationshipMethod when rendering reads an association the model does not define ([1c41cee](1c41cee)) * rename always_include_resource_ids to resource_ids, with a belongs_to_resource_ids_by_default setting ([8b11151](8b11151))
github-actions Bot
pushed a commit
that referenced
this pull request
Aug 10, 2026
# [2.0.0-beta.8](v2.0.0-beta.7...v2.0.0-beta.8) (2026-08-10) ### Bug Fixes * accept a single value for array filters ([#517](#517)) ([ee685b6](ee685b6)) * accept a single value for array filters ([#517](#517)) ([23f3e80](23f3e80)) * drop the relationship guard install notice ([65b8be6](65b8be6)) * reject invalid page parameters ([#537](#537)) ([fbb5683](fbb5683)), closes [#347](#347) * treat empty polymorphic configuration as unset ([#538](#538)) ([a27eeea](a27eeea)), closes [#199](#199) * typecast null values in filter lists ([#515](#515)) ([3756fd1](3756fd1)) * typecast null values in filter lists ([#515](#515)) ([3dcf4c8](3dcf4c8)) ### Features * add full set of commented-out Resource defaults in ApplicationResource when using the generator ([367678e](367678e)) * **generators:** explicit rendering by default, respond_with only when Responders is included ([70741fe](70741fe)) * in-tree plain ruby and sinatra examples ([b92c6d9](b92c6d9)) * ship the Rails application template in this repo ([76d5329](76d5329))
Contributor
|
🎉 This PR is included in version 2.0.0-beta.8 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
polymorphiccollection report as non-polymorphicThis also handles the case raised in the issue discussion where a previously populated collection later becomes empty: the behavior checks the current collection rather than relying only on assignment time.
Fixes #199
Validation
bundle exec rspec spec/polymorphism_spec.rb— 18 examples, 0 failuresbundle exec rspec— 1,421 examples, 0 failures, 21 pendingbundle exec standardrb— passed