@@ -578,34 +578,14 @@ render status: :forbidden
578
578
` ` ` Ruby
579
579
#bad
580
580
class Person
581
- after_commit/after_rollback :after_commit_callback
582
- after_save :after_save_callback
583
- around_save :around_save_callback
584
- after_update :after_update_callback
585
- before_update :before_update_callback
586
- after_validation :after_validation_callback
581
+ after_commit :after_commit_callback
587
582
before_validation :before_validation_callback
588
- before_save :before_save_callback
589
- before_create :before_create_callback
590
- after_create :after_create_callback
591
- around_create :around_create_callback
592
- around_update :around_update_callback
593
583
end
594
584
595
585
#good
596
586
class Person
597
587
before_validation :before_validation_callback
598
- after_validation :after_validation_callback
599
- before_save :before_save_callback
600
- around_save :around_save_callback
601
- before_create :before_create_callback
602
- around_create :around_create_callback
603
- after_create :after_create_callback
604
- before_update :before_update_callback
605
- around_update :around_update_callback
606
- after_update :after_update_callback
607
- after_save :after_save_callback
608
- after_commit/after_rollback :after_commit_callback
588
+ after_commit :after_commit_callback
609
589
end
610
590
` ` `
611
591
0 commit comments