Skip to content

Instantly share code, notes, and snippets.

@gregturn
Created January 7, 2015 17:19
Show Gist options
  • Select an option

  • Save gregturn/403b5e34e2dce9de1d19 to your computer and use it in GitHub Desktop.

Select an option

Save gregturn/403b5e34e2dce9de1d19 to your computer and use it in GitHub Desktop.
cujo rest DELETE
rest({method: 'DELETE', path: item._links.gallery.href})
.done(function() {
findLinkedItem(item).remove();
$('#images ul').append(createItemRow(item));
});
@gregturn

gregturn commented Jan 7, 2015

Copy link
Copy Markdown
Author

Ahh. Nice! Well, taken that, I think I found something perfect for my situation:

        item.clientFor('gallery')({method: 'DELETE'})
            .done(function(response) {
                if (response.status.code >= 200 && response.status.code < 300) {
                    findLinkedItem(item).remove();
                    $('#images ul').append(createItemRow(item));
                }
            });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment