Sha256: bd44d7f913e75c544911c4d3878b58b983f78090f66ade4eac26eb3be5ea615b
Contents?: true
Size: 345 Bytes
Versions: 7
Compression:
Stored size: 345 Bytes
Contents
module Song::Operation class Create < Trailblazer::Operation step :contract step :model # step :validate # step :save def model(ctx, params:, **) return unless params[:id] ctx[:model] = Song.new(params[:id]) end def contract(ctx, **) ctx[:contract] = Struct.new(:errors).new() end end end
Version data entries
7 entries across 7 versions & 1 rubygems