Join Dependency
class Physician < ActiveRecord::Base
has_many :appointments
has_many :patients, through: :appointments
end@physician.patients.to_a
Physician.joins(:appointments).to_a最后更新于
class Physician < ActiveRecord::Base
has_many :appointments
has_many :patients, through: :appointments
end@physician.patients.to_a
Physician.joins(:appointments).to_a最后更新于