*newbie apologies..
The following code:
dates = ['Transaction_Date','Renewal_Date']
dateoptions = ['Year','Month','Date']
word1 = "Amount"
dates.each do |x|
puts word1 + " by " + x
end
Returns
Amount by Transaction_Date
Amount by Renewal_Date
I would like the outcome to be a concatenation of the dates and dateoptions, like so
Amount by Transaction_Date (Year)
Amount by Transaction_Date (Month)
Amount by Transaction_Date (Date)
Amount by Renewal_Date (Year)
Amount by Renewal_Date (Month)
Amount by Renewal_Date (Month)
I was thinking of doing a nested "each do" but I still wouldn't know how to address the concatenation of the two arrays.
Appreciate your input