Any idea how I could get the list of posts that were created
on each date without having to do that Post.find query in my view?
You can use Enumerable#group_by.
sth like : Post.find(:all).group_by(&:created_on)
ok thanx a lot, and what if I want to group them by day cause I’m
using datetime which also have hours and second. I would like to group
them by day only. Any idea?
Any idea how I could get the list of posts that were created
on each date without having to do that Post.find query in my view?
You can use Enumerable#group_by.
sth like : Post.find(:all).group_by(&:created_on)
ok thanx a lot, and what if I want to group them by day cause I’m
using datetime which also have hours and second. I would like to group
them by day only. Any idea?