method

destroy

rails latest stable - Class: ActiveResource::Base

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.2.13) is shown here.

destroy()
public

Deletes the resource from the remote service.

Examples

my_id = 3
my_person = Person.find(my_id)
my_person.destroy
Person.find(my_id) # 404 (Resource Not Found)

new_person = Person.create(:name => 'James')
new_id = new_person.id # => 7
new_person.destroy
Person.find(new_id) # 404 (Resource Not Found)