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|
${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