Sha256: f6dcd09b681bbca48145fb6882b7ed1f92d657042eb024271c7076ca2797af14
Contents?: true
Size: 658 Bytes
Versions: 4
Compression:
Stored size: 658 Bytes
Contents
# frozen_string_literal: true module Pragma module Operation # Creates a new record and responds with the decorated record. # # @author Alessandro Desantis class Create < Pragma::Operation::Base step Macro::Classes() step Macro::Model() step Macro::Policy() step Macro::Contract::Build() step Macro::Contract::Validate() step Macro::Contract::Persist() step Macro::Decorator() step :respond!, name: 'respond' def respond!(options) options['result.response'] = Response::Created.new( entity: options['result.decorator.instance'] ) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
pragma-2.5.0 | lib/pragma/operation/create.rb |
pragma-2.4.0 | lib/pragma/operation/create.rb |
pragma-2.3.0 | lib/pragma/operation/create.rb |
pragma-2.2.0 | lib/pragma/operation/create.rb |