+
+ def overdue?
+ return due_date < Time.now.to_date
+ end
+
+ protected
+ def validate
+ errors.add(:customer_id, "does not exist is the database") if customer.nil?
+ errors.add(:rentable_id, "does not exist in the database") if rentable.nil?
+ end