File tree 1 file changed +37
-0
lines changed
1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -749,8 +749,45 @@ snippet mapwo
749
749
${1: map } .with_options :${2: controller } => '${3: thing } ' do |$3 |
750
750
${0}
751
751
end
752
+
753
+ # before callback
754
+ snippet mbv
755
+ before_validation :${0: method }
756
+ snippet mbc
757
+ before_create :${0: method }
758
+ snippet mbu
759
+ before_update :${0: method }
752
760
snippet mbs
753
761
before_save :${0: method }
762
+ snippet mbd
763
+ before_destroy :${0: method }
764
+
765
+ # after callback
766
+ snippet mav
767
+ after_validation :${0: method }
768
+ snippet maf
769
+ after_find :${0: method }
770
+ snippet mat
771
+ after_touch :${0: method }
772
+ snippet mac
773
+ after_create :${0: method }
774
+ snippet mau
775
+ after_update :${0: method }
776
+ snippet mas
777
+ after_save :${0: method }
778
+ snippet mad
779
+ after_destroy :${0: method }
780
+ snippet mrc
781
+
782
+ # around callback
783
+ around_create :${0:method}
784
+ snippet mru
785
+ around_update :${0: method }
786
+ snippet mrs
787
+ around_save :${0: method }
788
+ snippet mrd
789
+ around_destroy :${0: method }
790
+
754
791
snippet mcht
755
792
change_table :${1: table_name } do |t|
756
793
${0}
You can’t perform that action at this time.
0 commit comments