Sha256: cd5450828cc53eafc55e9aaa7f1d48ee2553e59851727a193490e9de6b46b04c
Contents?: true
Size: 545 Bytes
Versions: 9
Compression:
Stored size: 545 Bytes
Contents
module Hyrax module Actors # Wrap the stack in a database transaction. # This will roll back any database actions (particularly workflow) if there # is an error elsewhere in the actor stack. class TransactionalRequest < Actors::AbstractActor def create(attributes) ActiveRecord::Base.transaction do next_actor.create(attributes) end end def update(attributes) ActiveRecord::Base.transaction do next_actor.update(attributes) end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems