Topic: best way to manage group by request in rails?
Hey all,
I'm doing something like that:
in my controller:
@posts=Post.find(:all,:group=>'created_on')
then in my view:
<% for post in @posts %>
<div id=posts><% 'Posts created on '+post.created_on%>
@currentposts=Post.find_by_created_on(post.created_on)
<% for p in @currentposts %>
<li>p.title</li>
<% end %>
</div>
<% end %>
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?
thanx in advance
Pat