In Rails, using Restrict_With_Exception for a dependent class, my controller's exception/rescue is producing both outcomes, not one

后端 未结 0 744
梦毁少年i
梦毁少年i 2020-12-05 07:38

I have a Client class that has many Invoices. I don\'t want the user to be able to delete a Client unless it has no related invoices so in the Client model, I use: has

相关标签:
回答
  • 消灭零回复
提交回复
热议问题