Last active
August 29, 2015 14:15
-
-
Save uptownhr/31e682f210bd0be12c35 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
trans_ids = transactions.all.inject({}) do |hash, trx| | |
if hash[trx.mid_id].nil? | |
hash[trx.mid_id] = [] | |
end | |
hash[trx.mid_id].push trx.id | |
end | |
PP.pp trans_ids | |
//output is | |
[8] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment