Method: CurationConcerns::Actors::LeaseActor#destroy

Defined in:
app/actors/curation_concerns/actors/lease_actor.rb

#destroyObject

Update the visibility of the work to match the correct state of the lease, then clear the lease date, etc. Saves the lease and the work

Since:

  • 0.14.0



13
14
15
16
17
18
# File 'app/actors/curation_concerns/actors/lease_actor.rb', line 13

def destroy
  work.lease_visibility! # If the lease has lapsed, update the current visibility.
  work.deactivate_lease!
  work.lease.save!
  work.save!
end