2009/8/26 John Mcleod <[email protected]>: > > Hello all, > I'm using Ruby 1.8.6 and Rails 2.3.3. > I'm new at Rails so bear with me, please. > > My application reads in a csv file to a staging (imports) table then > compares the contents of the table to a main (projects) table. Then > imports all non-repetitive rows to the main table. > This application will be used periodically. > > I know how to import the csv data to a table. > How do I delete all data prior to importing new data?
YourModel.delete_all Colin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

