Module: ResourcesController::SingletonActions

Includes:
Actions
Defined in:
lib/resources_controller/singleton_actions.rb

Instance Method Summary collapse

Methods included from Actions

#create, #edit, #index, #new, #show, #update

Instance Method Details

#destroyObject

DELETE /event DELETE /event.xml


9
10
11
12
13
14
15
16
17
18
19
# File 'lib/resources_controller/singleton_actions.rb', line 9

def destroy
  self.resource = destroy_resource
  respond_to do |format|
    format.html do
      flash[:notice] = "#{resource_name.humanize} was successfully destroyed."
      redirect_to enclosing_resource_url if enclosing_resource
    end
    format.js
    format.xml  { head :ok }
  end
end