Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Doctor < ActiveRecord::Base
- has_many :reviews
- has_many :users, through: :reviews
- end
- class Review <ActiveRecord::Base
- belongs_to :user
- belongs_to :doctor
- end
- class User < ActiveRecord::Base
- has_many :reviews
- has_many :doctors, through: :reviews
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement