我想在销毁 Controller 中的对象之前添加一个确认框。基本上,创建
data: {confirm: "You sure" }
但是在object.destroy
期间在 Controller 中谢谢
最佳答案
您只能在 View 层与用户交互,因此您需要在进入 destroy 方法之前进行确认
关于ruby-on-rails - 从 Rails Controller 删除确认,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18237487/