Skip to content

Instantly share code, notes, and snippets.

@wjessop
Created January 25, 2010 10:46
Show Gist options
  • Save wjessop/285786 to your computer and use it in GitHub Desktop.
Save wjessop/285786 to your computer and use it in GitHub Desktop.
xml.instruct!
xml.declare! :DOCTYPE, :plist, :PUBLIC, "-//Apple Computer//DTD PLIST 1.0//EN", "http://www.apple.com/DTDs/PropertyList-1.0.dtd"
xml.plist("version" => 1.0) do |plist|
plist.dict do |dict|
Things.find_in_batches do |things|
things.each do |thing|
dict.key thing.id
dict.array do |array|
array.string thing.name
array.string thing.address
array.integer thing.number_of_frogs
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment