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)

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

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