Where should I put "sync database to an excel spreadsheet" capability

I don't know if anybody else has ever tried anything even remotely
resembling this, but I am in the process of taking a bunch o' data
currently maintained in an excel spreadsheet, and trying to write a
slick RoR database backed web application to manage that data.
Anticipating that this will take some time (I will probably spend
somewhere between 5 and 20 minutes per day working on this, so it is
likely that it will take quite a bit of time), I would like to start
by writing some code that will synchronize my database with the data
in the existing spreadsheet. In that manner, I can work with and test
my database application in isolation, with real data, with real use
cases, while the rest of my group uses the spreadsheet, until such
time as I can go public.

Enough boring background...Here's my real question ...

Where should I put my "sync to spreadsheet" code? Does it belong in a
model? In a helper? As a standalone Ruby app? Keeping in mind that
I'm the only person in the world who will ever use this, I recognize
that it can go anywhere. I'm just curious to learn where an expert
would put this type of code.

--wpd

Patrick Doyle wrote:

...In that manner, I can work with and test
my database application in isolation, with real data, with real use
cases, while the rest of my group uses the spreadsheet, until such
time as I can go public.

That's not very "Agile". You should figure out what the single most important feature to add to the spreadsheet, right now, then add it, and put it online. Even if this means you bypass ActiveRecord and write Rails controllers that manipulate the spreadsheet directly. After your app is part of the business cycle, _then_ you have breathing room to start putting records into ActiveRecord. (That's why they are called "migrations"!)

Many a well-meaning project has coded for a long time without deploying then got into terminal trouble at deploy time.

Where should I put my "sync to spreadsheet" code?

In the /lib folder, and tested in the test/unit folder.