Fixed fields_for with has_many associations

Fixes #504.
Kudos to @romanbsd for his tips on this at #462.

It's a lot of hoops jumping, maybe it'd be better to somehow (more reliably) map fields to validators on server side. Data attributes or something.