Method: InheritedResources::Actions#destroy
- Defined in:
- lib/inherited_resources/actions.rb
#destroy(options = {}, &block) ⇒ Object Also known as: destroy!
DELETE /resources/1
60 61 62 63 64 65 66 67 |
# File 'lib/inherited_resources/actions.rb', line 60 def destroy(={}, &block) object = resource object.destroy (:notice, '{{resource_name}} was successfully destroyed.') [:location] ||= collection_url rescue nil respond_with_dual_blocks(object, , nil, block) end |