Skip to content

Instantly share code, notes, and snippets.

@vanakenm
Created March 8, 2016 09:22
Show Gist options
  • Save vanakenm/d3dc7952e18d0d817eb7 to your computer and use it in GitHub Desktop.
Save vanakenm/d3dc7952e18d0d817eb7 to your computer and use it in GitHub Desktop.
class Doctor < ActiveRecord::Base
has_many :interns
has_many :consultations
has_many :patients, through: :consultations
validates :last_name, presence: true
validates :first_name, presence: true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment