Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Erik Straub's Profile

GitHub User: brickattack


Comments by Erik Straub


Nested forms for polymorphic associations are messy.

If the relationship wasn't polymorphic, you could do inverse_of on each model so that the code knew the relationship of the objects in memory.

I ran into this issue and did a sort-of hack to avoid validation errors in a nested polymorphic form:


^^ If you just use for the callback, it works.