Class: Pragma::Operation::Create

Inherits:
Base
  • Object
show all
Defined in:
lib/pragma/operation/create.rb

Overview

Creates a new record and responds with the decorated record.

Author:

  • Alessandro Desantis

Instance Method Summary collapse

Instance Method Details

#respond!(options) ⇒ Object



18
19
20
21
22
# File 'lib/pragma/operation/create.rb', line 18

def respond!(options)
  options['result.response'] = Response::Created.new(
    entity: options['result.decorator.instance']
  )
end