Hi,
You just cat you following in your view:
%= link_to 'Destroy', photo, :confirm = 'Are you sure?', :method
= :delete %
and it appear in browser to that:
a onclick=if (confirm('Are you sure?')) { var f =
document.createElement('form'); f.style.display = 'none';
this.parentNode.appendChild(f);
*your just CAN ADD (sorry for this typo)
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to
by the way, the same story about PUT
form method=post id=edit_photo_51 class=edit_photo action=/
photos/51
div style=margin: 0pt; padding: 0pt; display: inline;
input type=hidden value=put name=_method
input type=hidden
value=LgNwcxaXQ3+NT95f1SJYo1ZOUfXMFtQimzSzDmjJM3g=
DmitryPush wrote:
Hi,
You just cat you following in your view:
%= link_to 'Destroy', photo, :confirm = 'Are you sure?', :method
= :delete %
and it appear in browser to that:
a onclick=if (confirm('Are you sure?')) { var f =
document.createElement('form'); f.style.display = 'none';
4 matches
Mail list logo