Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Declare type key on polymorphic belongs_to #414
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
One of our projects uses a validation to ensure that only declared keys end up getting saved. In the case of these polymorphic mappings, the type key ends up undeclared. We've worked around it with a plugin, so we can live without the merge, but it makes sense to me to either declare both id and type keys or declare neither.