在我的应用程序中,一些资源无法销毁.所以我写了这样的模型:
before_destroy :destroy_check
def destroy_check
if some_reason?
errors.add(:base, 'cannot destroy this resource!')
end
errors.blank?
end
Run Code Online (Sandbox Code Playgroud)
然后,当我单击ActiveAdmin中的destroy按钮时,没有任何显示:没有错误,没有消息,并且记录没有被真正销毁.如何在销毁失败时显示错误消息?
如何使用Facebook POP框架进行循环动画.
我试图设置类中NO命名的属性removedOnCompletion,POPBasicAnimation但它不起作用.