dustin (owner)

Fork Of

Revisions

gist: 41462 Download_button fork
public
Public Clone URL: git://gist.github.com/41462.git
Embed All Files: show embed
Ruby #
1
2
3
4
5
6
7
8
9
def whack(objects)
  Hash[*objects.map{|o| [o.send('table_name'), o.send('delete_all')]}.flatten]
end
 
# or (depending on what "send" means there)
 
def whack(objects)
  Hash[*objects.map{|o| [o.table_name, o.delete_all]}.flatten]
end