does destroy retrurn in ruby
# Assuming `model` is an instance of a ActiveRecord model
# 1. Find a record by its ID
record = Model.find(1)
# 2. Destroy the record and return the destroyed object
destroyed_record = record.destroy
# `destroyed_record` now contains the object that was destroyed, or nil if the record was not found
# Alternatively, you can use the `destroy` method directly on the model class
destroyed_record = Model.destroy(1)