rails/rails — pull request #3750 by pwnall (2011-11-25 03:40:41+00:00)
Title: Fixes issue #3749: nested_attributes_for does not work with STI

When using the *_attributes= method generated by `nested_attributes_for1 to create new models, the newly created models always have the base class. The `type` attribute is ignored.

This patch includes a failing test and my first attempt at a fix. I know the fix isn't too pretty, and I'm hoping to get guidance on building a better patch.

Thank you!