Data manipulation from a database

Say, for example, I have this in my db:

id name date
1 Item_1 feb-19
2 Item_2 feb-20

and I want to manipulate it so that the view can output this:

feb-19:
Item1
feb-20:

Sorry

feb-19:
Item_1
feb-20:
Item_2

How would I go about doing that?

Maybe smth like that:
def list
@examples = Example.find(:all)
end

    <%for ex in @examples%>
  • <%= ex.date%>: <%ex.name%>
  • <%end%>
Also I think it's better to change your column name from "date to "created_at"/"updated_at" or add them both.

I forgot to mention smth: the data u wrote I assumed to be part of
“examples” table from your db.