--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Destroy an object (or multiple objects) that has the given id, the object is instantiated first, therefore all callbacks and filters are fired off before the object is deleted. This method is less efficient than ActiveRecord#delete but allows cleanup methods and other actions to be run.
- !ruby/struct:SM::Flow::P 
  body: This essentially finds the object (or multiple objects) with the given id, creates a new object from the attributes, and then calls destroy on it.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Attributes
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>id</tt> - Can be either an Integer or an Array of Integers.
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Examples
- !ruby/struct:SM::Flow::VERB 
  body: "  # Destroy a single object\n  Todo.destroy(1)\n\n  # Destroy multiple objects\n  todos = [1,2,3]\n  Todo.destroy(todos)\n"
full_name: ActiveRecord::Base::destroy
is_singleton: true
name: destroy
params: (id)
visibility: public
