Topic: Exam table help
Since my exams are looming I thought I'd make a timetable with Ruby on Rails to make an exam 'realisation' table. I've got the main structure off adding exams and I've styled them etc. even put in how long is left to each exam. However I want to put at the top out of the loop how long until the first exam, I then added a method to the controller being:
first_exam = Subject.find(:first, :order => "day ASC")
from_time = Time.now
distance_of_time_in_words(from_time, first_exam, include_seconds = false)
Is this the right way to go?
I got this far but have no idea how to execute it in the list view. Can someone push me in the right direction?
| My blog |