Skip to content

learn-co-students/ruby-oo-practice-has-many-through-template-nyc01-seng-ft-051120

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Has-Many-Through

This is boilerplate code for a has-many-through relationship. Make sure you fork the file to your repo!

You can define your models in the three files in folder app/models and then, test your code in the tools/console.rb file.

To run your code, type ruby tools/console.rb from the root directory in your terminal.

Here are some potential models you might use (The order of the models are random):

  • Doctor, Patient, Appointment
  • Artist, Genre, Song
  • Recipe, Ingredient, Quantity
  • Classroom, Student, Teacher
  • Subscription, Magazine, Person
  • Club, Student, Membership

When creating the models, be sure to include rich instance variables, so you can do more with the models! For instance, a doctor model might have things like name, field (field of study), and cost while a patient model might have things like name, ailments and income. In doing this, you might want to write methods where a patient can find the doctors (s)he can afford and/or a doctor appropriate for his/her pain.

There are no restrictions and no tests, so it's up to you to decide how to implement this!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages