Example of creating seed data with seed-fu

Using an existing table to programmatically create initial seed fu data definition

locations = CountryLocation.all
SeedFu::Writer.write("db/fixtures/country_locations.rb", class_name: "CountryLocation", :constraints => [:id]) do |writer|
  locations.each do |l|
    writer.add(id: l.id, iso: l.iso, name: l.name, printable_name: l.printable_name, iso3: l.iso3, numcode: l.numcode, email: l.email)
  end
end
Andy Henson