Im creating a time line with some columns from a table. At the moment is the time line just display each column ordered by the "created_at" field. But i want slice it for each day like this:
TODAY
content -|
|
|- content
|
content -|
|
YESTERDAY
|
|- content
|
content -|
At the moment am i using this code
<ul>
<% @timeline.each do |timeline| %>
<li>
<%= timeline.title %>
</li>
<% end %>
</ul>
I want to do something like the "each_slice(5)" function. Hope anybody can tell me how to do this. Thanks in advance.