Physician has_many Patients through Appointments
Patient has_many Physicians through Appointments
How can I make the Appointment name a concatenation of Physician name and Patient name automatically in the Appointment model?
Physician.name = 'Joe Doctor'
Patient.name = ' Sally Smith'
Appointment.name = "#{Patient.name} with #{Physician.name}"
This is not our real world use but a simplified example. Thanks.