Skip to content

Instantly share code, notes, and snippets.

@therealadam
Forked from damon/gist:41453
Created December 30, 2008 00:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save therealadam/41457 to your computer and use it in GitHub Desktop.
Save therealadam/41457 to your computer and use it in GitHub Desktop.
def whack(objects)
objects.inject({}) { |results, o| result.update(o.send('table_name') => o.send('delete_all'] }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment