rails fields_for does not render after validation error on nested form

后端 未结 3 503
栀梦
栀梦 2020-12-16 22:27

I have a nested form problem. I implemented the nested forms solution form the railscasts 196 & 197. It works if I have no validation errors.

So, form renders pe

3条回答
  •  离开以前
    2020-12-16 23:12

    I was also having the same problem with this behavior. Since I can't see your model, my guess is that you have :reject_if => :all_blank or some other lambda. This seems to be the culprit, although I don't have a fix. I would leave this as a comment instead of answer, but apparently I don't have enough reputation to do such a thing.

提交回复
热议问题