How do you group by week for a month of records, but only find dates for the month.
arget_date = Date.today.beginning_of_month target_range = target_date..target_date.end_of_month Post.where(created_at: target_range).group_by_week(:created_at, range: target_range).sum(:view_count...
Darion Wood posted