Ruby includes support for sorting out of the box.
sorted = @records.sort_by &:created_at
However, this doesn’t appear to have much to do with display and probably belongs in the controller.
Ruby includes support for sorting out of the box.
sorted = @records.sort_by &:created_at
However, this doesn’t appear to have much to do with display and probably belongs in the controller.