app/models/device.rb
# Return the device from its borrower.
# This is accomplished by returning the newest active loan on the device,
# allowing for expansion to a loan stack.
# :reek:FeatureEnvy
#
# @return [nil]
Return the device from its borrower.
This is accomplished by returning the newest active loan on the device,
allowing for expansion to a loan stack.
Return the device from its borrower . This is accomplished by returning the newest active loan on the device allowing for expansion to a loan stack .
def return
    loan = loans_by_creation_desc.active.first
    loan.return
    loan.save!
  end
def return loan = loans_by_creation_desc . active . first loan . return loan . save! end
Return the device from its borrower.
Return the device from its borrower .
None
nil