From 0312e12c29ba6946b9c203b758824ce071a6b0d2 Mon Sep 17 00:00:00 2001 From: Iuri Fernandes Date: Sun, 28 Apr 2013 15:51:55 -0300 Subject: [PATCH] Refactor old migration creation snippet and an alternative one --- snippets/ruby.snippets | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/snippets/ruby.snippets b/snippets/ruby.snippets index efb7075..fdf479a 100644 --- a/snippets/ruby.snippets +++ b/snippets/ruby.snippets @@ -896,16 +896,21 @@ snippet mct create_table :${1:table_name} do |t| ${2} end -snippet migration +snippet migration class .. < ActiveRecord::Migration .. def up .. def down .. end class ${1:class_name} < ActiveRecord::Migration - def self.up + def up ${2} end - def self.down + def down + end + end +snippet migration class .. < ActiveRecord::Migration .. def change .. end + class ${1:class_name} < ActiveRecord::Migration + def change + ${2} end end - snippet trc t.remove :${1:column} snippet tre @@ -913,7 +918,6 @@ snippet tre ${3} snippet tref t.references :${1:model} - #rspec snippet it it "${1:spec_name}" do