Hi everyone, I’ll start off with the question and then give the
When setting up my model, do I want to do all of my generate models at
the beginning and then fill in the migrations/model scripts all
referencing each other at the same time? Or should I start with just
one model at a time and build in the dependencies later? I’m kind of
I’m new to rails and have spent many hours with the book “Agile Web
Development with Rails”, which has been fantastic. I decided to start
up an example application to see if what I’ve learned so far has really
‘sunk in’, but I got a little stuck creating my model.
I want to model the situation where a teacher can add meeting
notes/grades for a student who belongs to a given class in a given year.
I think I’ll need the following tables:
Classes (belongs to a year)
Students (belongs to a class)
Meetings (belongs to a student)
The reason that years is a table is that some students take the class
for several years (3-yr program) and we should be able to select one
particular class from any given year.