app/models/device.rb
# Issues the device *to* a Borrower, without checking allowance.
#
# @param new_borrower [Borrower] the borrower that the device will belong to.
# @return [nil]
# @raise [ActiveRecord::RecordNotSaved] if the device already has an active
#   Loan
Issues the device *to* a Borrower, without checking allowance.
Issues the device * to * a Borrower without checking allowance .
def issue(borrower)
    raise ActiveRecord::RecordNotSaved, 'Device is already issued' if loans.active.any?
    borrowers << borrower
  end
def issue ( borrower ) raise ActiveRecord :: RecordNotSaved , 'Device is already issued' if loans . active . any? borrowers << borrower end
Issues the device *to* a Borrower, without checking allowance.
Issues the device * to * a Borrower without checking allowance .
None
nil
[ActiveRecord::RecordNotSaved] if the device already has an active Loan
[ ActiveRecord :: RecordNotSaved ] if the device already has an active Loan
borrower
<not_specific>
new_borrower
<not_specific>
the borrower that the device will belong to.
the borrower that the device will belong to .