I am wondering if anyone has any information on displaying records based
on their timestamp.
I want to on the front page of the website display the 3 most recently
uploaded games. I imagine I would do this by extracting the three games
with the most recent timestamp?
Any information/links/tutorials/articles/input will be appreciated.
It'll work in either place. (Of course regardless you need the .each() do |game| part in the template...)
But I'd put it in the controller as @recent_games =... Generally stuffing database access into the .html.erb makes things more complicated than they should be. And I would not consider "get the last 5 created..." of anything to be part of the model--unlike say routines to parse or format for standard display.