-
-
Save ganeshran/adbca08937b655c28bb2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2.0.0-p481 :009 > msgTypeHash = Message.all.group_by(&:dayofweek).map{ |k,v| [k,v.length] } | |
Message Load (1.0ms) SELECT "messages".* FROM "messages" | |
=> [["Tue", 1], ["Wed", 1], ["Thu", 3]] | |
#I am trying to get it in format format | |
{ {Tue:1},{Wed:1},{Thu:3}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment