add rails callbak methods
This commit is contained in:
parent
b2a91d1ea3
commit
9371c648e1
@ -749,8 +749,45 @@ snippet mapwo
|
|||||||
${1:map}.with_options :${2:controller} => '${3:thing}' do |$3|
|
${1:map}.with_options :${2:controller} => '${3:thing}' do |$3|
|
||||||
${0}
|
${0}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# before callback
|
||||||
|
snippet mbv
|
||||||
|
before_validation :${0:method}
|
||||||
|
snippet mbc
|
||||||
|
before_create :${0:method}
|
||||||
|
snippet mbu
|
||||||
|
before_update :${0:method}
|
||||||
snippet mbs
|
snippet mbs
|
||||||
before_save :${0:method}
|
before_save :${0:method}
|
||||||
|
snippet mbd
|
||||||
|
before_destroy :${0:method}
|
||||||
|
|
||||||
|
# after callback
|
||||||
|
snippet mav
|
||||||
|
after_validation :${0:method}
|
||||||
|
snippet maf
|
||||||
|
after_find :${0:method}
|
||||||
|
snippet mat
|
||||||
|
after_touch :${0:method}
|
||||||
|
snippet mac
|
||||||
|
after_create :${0:method}
|
||||||
|
snippet mau
|
||||||
|
after_update :${0:method}
|
||||||
|
snippet mas
|
||||||
|
after_save :${0:method}
|
||||||
|
snippet mad
|
||||||
|
after_destroy :${0:method}
|
||||||
|
snippet mrc
|
||||||
|
|
||||||
|
# around callback
|
||||||
|
around_create :${0:method}
|
||||||
|
snippet mru
|
||||||
|
around_update :${0:method}
|
||||||
|
snippet mrs
|
||||||
|
around_save :${0:method}
|
||||||
|
snippet mrd
|
||||||
|
around_destroy :${0:method}
|
||||||
|
|
||||||
snippet mcht
|
snippet mcht
|
||||||
change_table :${1:table_name} do |t|
|
change_table :${1:table_name} do |t|
|
||||||
${0}
|
${0}
|
||||||
|
Loading…
Reference in New Issue
Block a user