On Jun 8, 12:22 am, "J. D." <[email protected]> wrote:
> Hi Fred,

> puts "Updating Team Name = #{offensive_rushing.rows[i][1]}."
> --> Print me out an update to show me that you are updating the teams
> RushingOffense.update_all(:name => offensive_rushing.rows[i][1],
>         :games => offensive_rushing.rows[i][2])
> --> Update the :name with the name of the team
> --> Update the :games with the number of games that team has played
> --> Update it if the team already exists (not sure how to do this part)
> --> Add new data if the team doesn't exist (don't know how to do this
> part)

Sounds like you shouldn't be using update_all at all here, rather you
should be using find to find an appropriate row to update and if there
is none, create a new one.

Fred
--~--~---------~--~----~------------~-------~--~----~
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