Module: ActiveResource::Singleton

Extended by:
ActiveSupport::Concern
Defined in:
lib/active_resource/singleton.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#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