Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialigsm '
10,440 PointsDoes student_record.points = ... refer to the column called points?
Just to make it clear; is student_record.points a reference to the table's column called 'points'? Otherwise, I can't recall this syntax. Thanks.
1 Answer
vdivekar
3,544 Points.points
is an attribute from class Student(Model)
, and attributes of classes become fields/columns in the database table. student_record
is an instance of Student.
In the code, I think it's a way to manually update the points that a user has, in case a row has been created for that user once before.
igsm '
10,440 Pointsigsm '
10,440 PointsOk. Thank you.