if i have a table called cars with columns called year and type, and i
create a model and do this
@mycars = Cars.find(:all)
in my view i have something like this
for cars in @mycars
do something like print out cars.type
i know that @mycars in a hash where each key is a column name paired
with its corresponding value right?
without the for loop, how can i access the 2nd record directly?
@mycars.type = ?
how does the variables in the view know that cars relate to the Cars
is that for loop the same as something like this in c++
for (int i = 0; i < mycars.total; i++)