I have the following in my Product model.
def grouped_created_at
@created_ats = @products.group_by { |c| c.created_at }
end
Works fine, but I want to group by the date only. As this is a timestamp, i'm not getting the results I need. Can anyone advise how to modify this?
Many thanks!