Refactor old migration creation snippet and an alternative one

This commit is contained in:
Iuri Fernandes 2013-04-28 15:51:55 -03:00
parent 76f2ff8337
commit 0312e12c29

View File

@ -896,16 +896,21 @@ snippet mct
create_table :${1:table_name} do |t| create_table :${1:table_name} do |t|
${2} ${2}
end end
snippet migration snippet migration class .. < ActiveRecord::Migration .. def up .. def down .. end
class ${1:class_name} < ActiveRecord::Migration class ${1:class_name} < ActiveRecord::Migration
def self.up def up
${2} ${2}
end 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
end end
snippet trc snippet trc
t.remove :${1:column} t.remove :${1:column}
snippet tre snippet tre
@ -913,7 +918,6 @@ snippet tre
${3} ${3}
snippet tref snippet tref
t.references :${1:model} t.references :${1:model}
#rspec #rspec
snippet it snippet it
it "${1:spec_name}" do it "${1:spec_name}" do