Advertisement
Guest User

Untitled

a guest
Jul 25th, 2014
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. class Exercise < ActiveRecord::Base
  2. has_many :exercise_plans
  3. end
  4.  
  5. class Patient < ActiveRecord::Base
  6. has_many :exercise_plans # or perhaps just `has_one`?
  7. end
  8.  
  9. class ExercisePlan < ActiveRecord::Base
  10. belongs_to :patient
  11. has_and_belongs_to_many :exercises
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement