Sha256: 8be73c299e57bbb7e5e44f75239f84f9f761ae6cb0a99fa106877ba59f09871e
Contents?: true
Size: 698 Bytes
Versions: 17
Compression:
Stored size: 698 Bytes
Contents
module BloomRemit module Txns module Operations class Create < Trailblazer::Operation include Model model Txn, :create contract Contracts::Create include Dispatch callback :after_create do on_change :after_create end def process(params) validate(params[:txn]) do |f| f.model.secret = SecureRandom.uuid f.save dispatch! :after_create end end private def after_create(form, opts) ActiveRecord::Base.after_transaction do PayoutJob.perform_async(form.model.id) end end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems