I have a User table with the columns full_name, email, phone, address, city, state, zip
I need to create an array from the User table that contains the fullname and email in this format ["user1.full_name, user1.email", "user2.full_name, user2.email" etc]
I am having trouble writing this query.
This is what I have so far
#create empty arrays
full_names = []
emails = []
#populate the full_names array
user_full_name = User.all
user_full_name.each{|x| full_names<<x.full_name}
#populate the emails array
user_email = User.all
user_email.each{|x| emails<<x.email}
#combine the two arrays
full_names.zip(emails)
But that gives me a multidimensional array of [["full_name, email"], ["full_name, email"] etc]
How do I get it in the format of ["full_name, email", "full_name, email" etc]