Skip to content

Instantly share code, notes, and snippets.

@twilliamsark
twilliamsark / keybase.md
Created August 26, 2015 23:10
keybase.md

Keybase proof

I hereby claim:

  • I am twilliamsark on github.
  • I am twilliams (https://keybase.io/twilliams) on keybase.
  • I have a public key whose fingerprint is C9C1 55BF 6C61 E70C 8192 4464 130B 4C21 9D41 5DB0

To claim this, I am signing this object:

@twilliamsark
twilliamsark / seed_fu_serializable.rb
Last active August 29, 2015 14:05
Concern for adding ability to serialize a model's table to create a seed_fu insert script
module SeedFuSerializeable
extend ActiveSupport::Concern
included do
define_method(:to_h) do
h = attributes.keys.select{|k| k != "created_at" && k != "updated_at" }.map{|k| "#{k}: #{k}"}.join(', ')
eval("{#{h}}")
end
end