ryanb/railscasts-episodes

Ep 196 - nested model form pt 1. :reject_if => lambda prevents validation?

chiperific opened this issue · 0 comments

To replicate:

  1. Create a new Survey.
  2. Title the Survey.
  3. Leave Question1 blank
  4. Enter text in Question1 > Answer1
  5. Submit form.

Survey is created without Question1. Answer1 text is lost.

I want survey to throw error on submit noting that Qestion1 can't be blank. Any ideas?