Last active
February 13, 2016 17:11
-
-
Save Shafaet/745b4f86486dfae6b6b7 to your computer and use it in GitHub Desktop.
message
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
list=["user1",user2"] | |
list.each do |name| | |
h=Hacker.find_by_username(name) | |
m=Message.where(receiver_id: h.id) | |
puts h.id,m | |
end | |
#it will output only hackerid's if nobody sent any messages, otherwise it will print list of messages too |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment