This repository was archived by the owner on Mar 30, 2022. It is now read-only.
Bug: scope_for_create with polymorphic association#279
Open
Peeja wants to merge 1 commit intoactiverecord-hackery:masterfrom
Open
Bug: scope_for_create with polymorphic association#279Peeja wants to merge 1 commit intoactiverecord-hackery:masterfrom
Peeja wants to merge 1 commit intoactiverecord-hackery:masterfrom
Conversation
In a #where specifying a value for a polymorphic association, the _type is not set in the #scope_for_create attributes. In vanilla AR4, _type and _id are both set.
Author
|
Possibly related to #265? |
Author
|
By the way, this and #277 were exceedingly easy to write failing specs for, despite having no idea how Squeel's internals work. I had the specs running green in a couple of minutes, and adding my own test was straightforward. Thanks for making Squeel so awesome to work with. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
In a
#wherespecifying a value for a polymorphic association, the_typeisnot set in the
#scope_for_createattributes. In vanilla AR4,_typeand_idare both set.
Failing spec is attached.