Consider these as my table structure
class Physician < ActiveRecord::Base
has_many :appointments
has_many :patients, :through => :appointments
end
class Appointment < ActiveRecord::Base
belongs_to :physician
belongs_to :patient
end
class Patient < ActiveRecord::Base
has_many :appointments
has_many :physicians, :through => :appointments
end
My Appointments table has an extra column called relationship. Everytime when i associate the Physician and the patient, I would like to add a relationship [my example sounds weird at so many levels] , how can i insert value into that column?
Why not just this?