I would think you can do this with seed data OR just have one of your
migration files add the categories like
%w(cat1 cat2 cat3 cat4).each do |cat|
Category.create(:name => cat)
end
Normally for production this is only done once then it stays in the db
for each deployment after that. It almost sounds like you clear the db
when you deploy is that correct? Is this for a test server or
development?
At this point, I only set up the db structure in migrations, no data
at all.
So no data could be transfered to the server…
Setting up data in migrations is possible but awkward if you have more
than a very small number of records. Fortunately, there are a couple of
gems and plugins designed for seed data (I’ve never used any of them,
but a quick Web search should get you some useful info), and it wouldn’t
be at all hard to write a simple Rake task or config item that reads
data out of a YAML file or something.