I'm looking to write a Ruby script which I can load into the Rails Console which will access data from the models I have created. I created a model called student using the following command and populated it with data:
script/generate scaffold student given_name:string middle_name:string family_name:string date_of_birth:date grade_point_average:decimal start_date:date
how would I, for instance, get the script to print a list of names of all the students? are there any resources which describe how to do this in detail? I haven't been able to find anything. Thanks!
- Steve