Class: Pragma::Operation::Destroy

Inherits:
Base
  • Object
show all
Includes:
Defaults
Defined in:
lib/pragma/operation/destroy.rb

Overview

Finds the requested record, authorizes it and decorates it.

Instance Method Summary collapse

Methods included from Defaults

included

Instance Method Details

#callObject



10
11
12
13
14
15
16
17
# File 'lib/pragma/operation/destroy.rb', line 10

def call
  context.record = find_record
  authorize! context.record

  context.record.destroy!

  head :no_content
end