rails long way how to write belongs_to association code example
Example: activerecord through
class Doctor < ApplicationRecord
has_many :patients, through: :consultation
end
class Doctor < ApplicationRecord
has_many :patients, through: :consultation
end