To Examples

School1 and School3 Examples

Source code file: School1/db/seeds.rb and School3/db/seeds.rb:

# Seed file for the School1 and School3 Examples.

# Populate students database.
s = Student.new
s.name = "Crawford, Allen"
s.gender = "M"
s.phone = "312/234-3456"
s.save

s = Student.new
s.name = "Dungres, Linda"
s.gender = "F"
s.phone = "312/345-5465"
s.save

s = Student.new
s.name = "Schultz, Milton"
s.gender = "M"
s.phone = "312/465-6958"
s.save

s = Student.new
s.name = "Murphey, Roger"
s.gender = "M"
s.phone = "312/645-3283"
s.save

s = Student.new
s.name = "Agrell, Victoria"
s.gender = "F"
s.phone = "312/283-3746"
s.save

s = Student.new
s.name = "Sampson, Trudy"
s.gender = "F"
s.phone = "312/908-3450"
s.save

# Populate the courses table.
c = Course.new
c.course_num = "IT130"
c.title = "Intro to Web Programming"
c.credit_hours = 4
c.save

c = Course.new
c.course_num = "ENG101"
c.title = "College Writing"
c.credit_hours = 4
c.save

c = Course.new
c.course_num = "HST209"
c.title = "U.S. History"
c.credit_hours = 4
c.save

c = Course.new
c.course_num = "BIO103"
c.title = "Biology I"
c.credit_hours = 4
c.save

c = Course.new
c.course_num = "MAT130"
c.title = "Calculus I"
c.credit_hours = 4
c.save

c = Course.new
c.course_num = "CHEM101"
c.title = "Inorganic Chemistry"
c.credit_hours = 4
c.save

c = Course.new
c.course_num = "ENG390"
c.title = "Senior Seminar"
c.credit_hours = 2
c.save

# Populate the enrollments table.
e = Enrollment.new
e.student_id = 4
e.course_id = 4
e.save

e = Enrollment.new
e.student_id = 4
e.course_id = 5
e.save

e = Enrollment.new
e.student_id = 6
e.course_id = 1
e.save

e = Enrollment.new
e.student_id = 6
e.course_id = 3
e.save

e = Enrollment.new
e.student_id = 2
e.course_id = 6
e.save

e = Enrollment.new
e.student_id = 2
e.course_id = 3
e.save

e = Enrollment.new
e.student_id = 2
e.course_id = 7
e.save