Steve Ross wrote: > On Jul 17, 2009, at 2:17 PM, Älphä Blüë wrote: > >> >> Finally, saving the data to the Table object that is currently open in >> Rake in the exact format specified above... > > So if I were to abstract this one level, I would say: "you want a > container-like data structure that can describe a unique odd-numbered > team id and 14 ratings for even-numbered teams. By iterating this > container, you will then update each database row that corresponds to > the team id." Is this a correct description of your goal? > > Sorry if I'm not getting this.
hehe, hey steve, no really it's okay mate. I wish I could describe things better. I believe it's because I've been working now about 11 hours a day 7-days a week on this project and I'm just a bit brain fried. Look back at the pastie code again and look all the way to the bottom. I wrote a tiny loop in rake that showcases all of the arrays and their data. >From that view point, I have all of the data. However, let's take a small step into the problem using just two examples.. array 1 holds team_id for table one. array 2 holds rating value for table_id for table one. array 3 holds team_id for table two. array 4 holds rating value for table _id for table two. All of these arrays contain exactly 120 rows of data. But, i can't simply iterate them or match them up.. If I did so I would see: Rownum | Array 1 | Array 2 | Array 3 | Array 4 0 65 43.43 47 97.34 Notice that array 1 and array 3 which hold the team IDs do not match up. Therefore I can't just save the data by rows.. I need the existing data organized into a complete array so it looks like: Rownum | Array 1 | Array 2 | Array 3 | Array 4 0 1 42.14 1 18.97 1 2 97.32 2 49.97 2 3 54.22 3 87.12 as you can see by this view, I want all of the arrays gathered into one large array, sorted by team_id. I mean perhaps my issue is that when I return the data to rake, I need to first sort the information somehow and then return it to rake. That way all 28 arrays are already sorted by team_id and can just be iterated over 120 rows... I hope this makes sense. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---