Tuesday 15 May 2012

accessing data from the model using script/console (Ruby on Rails) -


I am looking to write a Ruby script which I can load in Rail Console, which I Data will be accessed. was made. I have created a model using the following command and it is populated with data:

  Script / Generated students generate the given name: string middle_name: string family_name: string date_of_birth : Date grade_point_average: decimal start_date: date  

For example, how do I get a script to print a list of names of all students? Is there a resource that describes this in detail? I can not find anything Thanks!

  • Steve

  students = student All students. Students | P. student.name expiration  

No comments:

Post a Comment