If I type in my console
u = User.first
u.friends(&map:username)
I get ["Peter", "Mary", "Jane"] but I also want to show the birthday, so how do I do that? I tried
u.friends(&map:username, &map:birthday)
but this doesn’t work.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use the alternate block syntax:
which would give an array of arrays.
would give you an array of strings. You can do quite a bit from there.