You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, user.liked_collections.create! works.
And user.liked_collections.with_public_access.create! creates the collection, but fails to create a like to link it to the user.
RKushnir
changed the title
Has-many-through-polymorphic fails to create join model when used with scope
Has-many-through fails to create join model when used with scope
Feb 25, 2015
Various behaviors needed by associations (such as creating the through
record) are lost when `where` is called, since we stop having a
`CollectionProxy` and start having an `AssociationRelation` which does
not contain this behavior. I *think* we should be able to rm
`AssociationRelation`, but we have tests saying the changes required to
do that would be bad (Without saying why. Of course. >_>)
Fixes#19073.
Conflicts:
activerecord/CHANGELOG.md
I have the following models
Now,
user.liked_collections.create!
works.And
user.liked_collections.with_public_access.create!
creates thecollection
, but fails to create alike
to link it to theuser
.UPD. Gist to reproduce https://gist.github.com/RKushnir/57d0064541da39f9b8e4
The text was updated successfully, but these errors were encountered: