How to display error messages in a multi-model form with transaction?

后端 未结 5 1278
长情又很酷
长情又很酷 2021-01-23 06:53

Two models, Organization and User, have a 1:many relationship. I have a combined signup form where an organization plus a user for that organization get signed up.

The p

5条回答
  •  旧巷少年郎
    2021-01-23 07:29

    Looks like you have a lot of untestable logic in your controller. Looks like for you logic will be better to use simple FormObject pattern. https://robots.thoughtbot.com/activemodel-form-objects

提交回复
热议问题