Fix has_many form rendering with new_record: false

Fixes #2773
Merge pull request #2831 from shekibobo/2773-fix-has-many-new-record

Fix has_many form rendering with new_record: false