Last active
August 29, 2015 14:15
-
-
Save czepluch/b6c089ed40471c1cc059 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
@quiz.responses.group(:uid).all.each {|uid, responses| puts "hello i'm #{uid} and my first response was: "} | |
=> [#<Response id: 46, question: "Region", answer: "South Korea", date: "2015-02-04", count: nil, created_at: "2015-02-04 12:42:03", updated_at: "2015-02-04 12:42:03", uid: "1423053723649", quiz_id: 3>, #<Response id: 55, question: "Region", answer: "Other Asian country", date: "2015-02-04", count: nil, created_at: "2015-02-04 12:43:40", updated_at: "2015-02-04 12:43:40", uid: "1423053820457", quiz_id: 3>, #<Response id: 73, question: "Region", answer: "Hong Kong", date: "2015-02-16", count: nil, created_at: "2015-02-16 13:31:47", updated_at: "2015-02-16 13:31:47", uid: "1424093507276", quiz_id: 3>] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment