Skip to content

Instantly share code, notes, and snippets.

@oroce
oroce / README.md
Created June 12, 2014 07:51
nginx request id
@gilesbowkett
gilesbowkett / migration.rb
Created June 13, 2011 05:38
Rails migrations which automatically put the new filename in your paste buffer
# this monkey-patches code defined in railties-3.1.0.rc1/lib/rails/generators/migration.rb
# (obviously, this might differ very slightly in the latest release candidate)
module Rails
module Generators
module Migration
module ClassMethods
# differs from the "real" version by only one line
def migration_template(source, destination=nil, config={})
destination = File.expand_path(destination || source, self.destination_root)