Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Possible AR Polymorphic Association Regression (5.2.0.beta2)? #31328
Steps to reproduce
I have reduced the models in my application to the essential association. Post (parent) has a Tracker (polymorphic child association. Given a child, I need to get it's parent record.
In the context of the Bug Report Template My Template Source,
In Rails 5.1.4, this works (finding a parent from a polymorphic child):
After upgrading to Rails 5.0.2.beta2 (as well as on edge), I now get an exception:
Though I can get the association starting from the final point: Parent -> Child -> Parent
Digging into active_record/reflection.rb for 5.1.4, I see
While in 5.2.0.beta2,
Rails version: Rails 5.2.0.beta2 (and edge)
Ruby version: Ruby MRI 2.4.2
Thank you for your time! I appreciate all you do for the project!
Can't reproduce on