def destroy(options = {}, &block)
      object = get_resource_ivar || find_resource

      object.destroy
      options[:location] = collection_path

      respond_with(object, options, &block)
    end
def destroy(options = {}, &block)
      object = get_resource_ivar || find_resource

      object.destroy
      options[:location] = collection_path

      respond_with(object, options, &block)
    end
destroy action, finds an object based on the passed id, if no object is
 found an ActiveRecord::RecordNotFound is raised. If the record is found
 then it's destroyed and a redirect to the index action is made.