Skip to content

Instantly share code, notes, and snippets.

View therealadam's full-sized avatar
🍔
Building Pingboard. Accepting JavaScript. Still loving Rails. Telling jokes.

Adam Keys therealadam

🍔
Building Pingboard. Accepting JavaScript. Still loving Rails. Telling jokes.
View GitHub Profile
require 'rubygems'
require 'validatable'
module ValidatableForm
module ClassMethods
def fields
@fields ||= []
end
@therealadam
therealadam / gist:41457
Created December 30, 2008 00:41 — forked from damon/gist:41453
def whack(objects)
objects.inject({}) { |results, o| result.update(o.send('table_name') => o.send('delete_all'] }
end