Skip to content

Instantly share code, notes, and snippets.

@codahale
Forked from damon/gist:41453
Created December 30, 2008 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codahale/41459 to your computer and use it in GitHub Desktop.
Save codahale/41459 to your computer and use it in GitHub Desktop.
def whack(objects)
return Hash[*objects.map{ |o| [o.send("table_name"), o.send("delete_all")] }.flatten]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment