app/models/loan.rb
# The number of days the loan is overdue.
#
# @return [Integer]
The number of days the loan is overdue.
The number of days the loan is overdue .
def days_overdue
    return 0 unless overdue?
    date_today  = Loan.adjust_by_rollover DateTime.current
    date_issued = Loan.adjust_by_rollover created_at
    (date_today - date_issued).to_i
  end
def days_overdue return 0 unless overdue? date_today = Loan . adjust_by_rollover DateTime . current date_issued = Loan . adjust_by_rollover created_at ( date_today - date_issued ) . to_i end
The number of days the loan is overdue.
The number of days the loan is overdue .
None
Integer