Removed some Ruby duplicated snippets and fixed the migration snippet
to don't use a non-existent function.
This commit is contained in:
parent
84826018eb
commit
90177034e3
@ -680,8 +680,6 @@ snippet logi
|
|||||||
logger.info { "${1:message}" }${2}
|
logger.info { "${1:message}" }${2}
|
||||||
snippet logw
|
snippet logw
|
||||||
logger.warn { "${1:message}" }${2}
|
logger.warn { "${1:message}" }${2}
|
||||||
snippet mac
|
|
||||||
add_column :${1:table}, :${2:column}, :${3:type}
|
|
||||||
snippet mapc
|
snippet mapc
|
||||||
${1:map}.${2:connect} '${3:controller/:action/:id}'
|
${1:map}.${2:connect} '${3:controller/:action/:id}'
|
||||||
snippet mapca
|
snippet mapca
|
||||||
@ -696,37 +694,12 @@ snippet mapwo
|
|||||||
end
|
end
|
||||||
snippet mbs
|
snippet mbs
|
||||||
before_save :${1:method}
|
before_save :${1:method}
|
||||||
snippet mcc
|
|
||||||
change_column :${1:table}, :${2:column}, :${3:type}
|
|
||||||
snippet mccc
|
|
||||||
t.column :${1:title}, :${2:string}
|
|
||||||
snippet mcht
|
snippet mcht
|
||||||
change_table :${1:table_name} do |t|
|
change_table :${1:table_name} do |t|
|
||||||
${2}
|
${2}
|
||||||
end
|
end
|
||||||
snippet mcol
|
|
||||||
remove_column :${1:table}, :${2:column}
|
|
||||||
snippet mct
|
|
||||||
create_table :${1:table_name} do |t|
|
|
||||||
t.column :${2:name}, :${3:type}
|
|
||||||
end
|
|
||||||
snippet migration
|
|
||||||
class ${1:`Snippet_MigrationNameFromFilename()`} < ActiveRecord::Migration
|
|
||||||
def self.up
|
|
||||||
${2}
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.down
|
|
||||||
end
|
|
||||||
end
|
|
||||||
snippet mp
|
snippet mp
|
||||||
map(&:${1:id})
|
map(&:${1:id})
|
||||||
snippet mrc
|
|
||||||
remove_column :${1:column}
|
|
||||||
snippet mrmc
|
|
||||||
remove_column :${1:table}, :${2:column}
|
|
||||||
snippet mrnc
|
|
||||||
rename_column :${1:table}, :${2:old}, :${3:new}
|
|
||||||
snippet mrw
|
snippet mrw
|
||||||
mattr_accessor :${1:attr_names}
|
mattr_accessor :${1:attr_names}
|
||||||
snippet oa
|
snippet oa
|
||||||
@ -854,13 +827,6 @@ snippet tcts
|
|||||||
snippet tctss
|
snippet tctss
|
||||||
t.timestamps
|
t.timestamps
|
||||||
${1}
|
${1}
|
||||||
snippet trc
|
|
||||||
t.remove :${1:column}
|
|
||||||
snippet tre
|
|
||||||
t.rename :${1:old_column_name}, :${2:new_column_name}
|
|
||||||
${3}
|
|
||||||
snippet tref
|
|
||||||
t.references :${1:model}
|
|
||||||
snippet va
|
snippet va
|
||||||
validates_associated :${1:attribute}
|
validates_associated :${1:attribute}
|
||||||
snippet vao
|
snippet vao
|
||||||
@ -905,8 +871,33 @@ snippet mac
|
|||||||
add_column :${1:table_name}, :${2:column_name}, :${3:data_type}
|
add_column :${1:table_name}, :${2:column_name}, :${3:data_type}
|
||||||
snippet mrc
|
snippet mrc
|
||||||
remove_column :${1:table_name}, :${2:column_name}
|
remove_column :${1:table_name}, :${2:column_name}
|
||||||
snippet mrenc
|
snippet mrnc
|
||||||
rename_column :${1:table_name}, :${2:old_column_name}, :${3:new_column_name}
|
rename_column :${1:table_name}, :${2:old_column_name}, :${3:new_column_name}
|
||||||
|
snippet mcc
|
||||||
|
change_column :${1:table}, :${2:column}, :${3:type}
|
||||||
|
snippet mccc
|
||||||
|
t.column :${1:title}, :${2:string}
|
||||||
|
snippet mct
|
||||||
|
create_table :${1:table_name} do |t|
|
||||||
|
t.column :${2:name}, :${3:type}
|
||||||
|
end
|
||||||
|
snippet migration
|
||||||
|
class ${1:class_name} < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
${2}
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
snippet trc
|
||||||
|
t.remove :${1:column}
|
||||||
|
snippet tre
|
||||||
|
t.rename :${1:old_column_name}, :${2:new_column_name}
|
||||||
|
${3}
|
||||||
|
snippet tref
|
||||||
|
t.references :${1:model}
|
||||||
|
|
||||||
#rspec
|
#rspec
|
||||||
snippet it
|
snippet it
|
||||||
|
Loading…
x
Reference in New Issue
Block a user