On Jul 17, 2009, at 11:21 AM, Älphä Blüë wrote:

>
> The matches are:
>
> to_teamid | to_ppcs
> ro_teamid | ro_ppcs
> po_teamid | po_ppcs
> so_teamid | so_ppcs
> etc.
> etc.
> .. for 14 total rake subtasks
>
> each of the matches contain 120 teams and 120 PPCS values  
> corresponding
> to that column/field.
>
> I need to organize the entire dataset so that..
>
> to_ppcs values go into the to_ppcs column where to_teamid == team_id
> ro_ppcs values go into the ro_ppcs column where ro_teamid == team_id
> po_ppcs values go into the po_ppcs column where po_teamid == team_id
> so_ppcs values go into the so_ppcs column where so_teamid == team_id
> etc.
> etc.
> .. for 14 total arrays..
>
> Each array contains exactly 120 rows of data..
>
> I hope this additional information helps.


I think that you aren't getting much response because:
   A) you aren't giving the right amount of detail
   B) you seem to be asking for design help

 From your other thread, http://pastie.org/548692 shows that you are  
calling a .compiled_this_week method on each of several models, but  
you don't show that code (or even the inspect'ed array of data that  
you have).

I think that a rake task is probably the wrong way to approach this.  
It's more likely that you want to do a script/runner Tsos.update (for  
some method 'update' on the class Tsos). Your approach seems very much  
procedural and not at all object-oriented.

If you back up just a bit and give some of your assumptions (like how  
you get data into the database in the first place), you might get a  
few useful hints as to how to proceed. Since you are asking your  
questions on the Rail mailing list (or posting to that forum), I'm  
going to assume that you do actually have a Rails application  
surrounding this data, however, you haven't really been asking Rails  
questions so far. They've either been Ruby questions or design  
questions.  That might be part of the problem, too.

-Rob

Rob Biedenharn          http://agileconsultingllc.com
[email protected]



--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to