Skip to content

Instantly share code, notes, and snippets.

@lappi-lynx
Created June 11, 2013 16:43
Show Gist options
  • Save lappi-lynx/5758489 to your computer and use it in GitHub Desktop.
Save lappi-lynx/5758489 to your computer and use it in GitHub Desktop.
Rails group_by_day method
# Method for grouping users by the day (for postgresql):
User.order("DATE(created_at)").group("DATE(created_at)").count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment