如果父母没有孩子,我怎能摧毁他? 购物车有许多愿望,如果用户删除了所有愿望,我想破坏它。
谢谢
答案 0 :(得分:2)
您可以确定LEAVE EMPTY
的父cart
的父wish
在行动之前将被销毁(before_destroy
),并检查父{J}}在cart
之后是否有任何瑕疵破坏。
wish
希望这有帮助
答案 1 :(得分:0)
使用Rails 5
我不得不为孩子添加依赖性破坏
<html>
<head><title>sftp.mysite.com</title>
<link href="/EFTClient/efthtmladvanced.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/EFTClient/efthtmladvanced.js">
</script>
<script type="text/javascript" src="/EFTClient/Shared/PTCs.js">
</script>
</head>
<body onload="javascript:init();"><div class=header><H1 CLASS=cwd>sftp.mysite.com - /Input/Applications/UKC Apps/</H1></div>
<h3><i>NOTE: Web Transfer Client Access has been disabled for this user or container. Reverting to basic client.</i></h3>
<hr />
<FORM NAME="frmUpload" METHOD="POST" ACTION="/Input/Applications/UKC Apps/" ENCTYPE="multipart/form-data"><table border=0 width='90%'>
<tr>
<td width='70%'>
<LABEL ACCESSKEY=U CLASS=filelabel>Upload a file to current folder: <INPUT TYPE="file" NAME="eftupload" CLASS=filefield/></LABEL>
<INPUT TYPE="submit" value="Upload" CLASS=submitbutton>
</td>
<td width='30%' align='right'>
<INPUT TYPE='button' value='Change Password' onclick="setChangePassDivPosition();showDiv('ChangePass', true);">
<INPUT style="visibility:visible;valign='top';" TYPE='button' value='Log Out' onclick='doLogout(); window.location.reload(true); return false;'>
</td>
</tr>
</table>
</FORM><hr />
<pre>
<a href="/Input/Applications/;html">[To Parent Directory]</a><br><br>
<input type="button" value="Delete" name="btnDelete" id="btnDelete" onClick="javascript:deleteFiles();"><BR>
<input type='checkbox' name='folderitem' value="/Input/Applications/UKC Apps/my file.txt" id='1'> <a href='javascript:void(0);' onclick="rename('/Input/Applications/UKC Apps/my file.txt');">Rename</a> 18 Dec 2017 14:02 56955145 <a href="/Input/Applications/UKC Apps/myfile.txt;html">my file.txt</a><BR>
</pre><hr>
<form name="changePassForm" id="changePassForm" method="post"><div id="ChangePass" class="floatingDiv" style="{ visibility:hidden; }"><table cellpadding="5" cellspacing="0" width="100%" style="border:1px solid black; border-bottom:0px"><tr class="divHeader"><td><table cellpadding=0 cellspacing=0 width="100%%"><tr><td class="formCopy"><b>Change Password</b></td><td class="formCopy" align="right"><a title="Click here to close this dialog" href="javascript:void(0)" onclick="showDiv('ChangePass', false);" style="font-family:verdana; font-size:10px; color:black; text-decoration:none">X</a></td></tr></table></td></tr></table><table cellpadding="5" cellspacing="0" width="100%%" style="border:1px solid black;"><tr><td class="formCopy">Current Password:</td><td class="formCopy"><input type="password" value="" name="oldpass" id="oldpass"></td></tr><tr><td class="formCopy">New Password:</td><td class="formCopy"><input type="password" value="" name="newpass" id="newpass"></td></tr><tr><td class="formCopy">Confirm Password:</td><td class="formCopy"><input type="password" value="" name="confirmpass" id="confirmpass"></td></tr><tr><td class="formCopy"> </td><td class="formCopy"> </td></tr></table><table cellpadding="5" cellspacing="0" style="border:1px solid black; border-top:2px solid #aaaaaa;" class="divHeader" width="100%%"><tr><td colspan="2" align="right"><input type="button" value="Change Password" onclick="changePassword(this.form);"> <input type="button" value="Cancel" onclick="showDiv('ChangePass', false);"></td></tr></table></div></form><br /><br />
<center><font face="arial" size="1" color=#3366CC><em>Powered by the <b>Globalscape EFT Server</b></em></font></center>
<br />
</body>
</html>