Class: Hyrax::Transactions::Steps::DestroyWork Deprecated
- Defined in:
This is part of the legacy AF set of transaction steps for works. Transactions are not being used with AF works. This will be removed in 4.0.
A `dry-transcation` step that destroys a Work.
Instance Method Summary collapse
Instance Method Details
#call(work) ⇒ Dry::Monads::Result
19 20 21 22 23
# File 'lib/hyrax/transactions/steps/destroy_work.rb', line 19 def call(work) work.destroy! && Success(work) rescue => err Failure(err) end