Method: ActiveResource::Singleton#destroy

Defined in:
lib/active_resource/singleton.rb

#destroyObject

Deletes the resource from the remote service.

Examples

weather = Weather.find
weather.destroy
Weather.find # 404 (Resource Not Found)


85
86
87
# File 'lib/active_resource/singleton.rb', line 85

def destroy
  connection.delete(singleton_path, self.class.headers)
end