Skip to content

Commit 5f261d0

Browse files
committed
Revert "Remove unused callbacks in the Topic model"
This reverts commit b33ccaa. That isn't hit by `git grep`, but actually used in meta-programming... https://github.com/rails/rails/blob/b33ccaa6c335e2ce482c9de1aa05e4a612aa84bc/activerecord/test/cases/transactions_test.rb#L1020-L1028
1 parent b33ccaa commit 5f261d0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

activerecord/test/models/topic.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ def topic_id
5656

5757
alias_attribute :heading, :title
5858

59+
before_validation :before_validation_for_transaction
5960
before_save :before_save_for_transaction
61+
before_destroy :before_destroy_for_transaction
6062

6163
after_save :after_save_for_transaction
6264
after_create :after_create_for_transaction
@@ -106,7 +108,9 @@ def set_email_address
106108
end
107109
end
108110

111+
def before_validation_for_transaction; end
109112
def before_save_for_transaction; end
113+
def before_destroy_for_transaction; end
110114
def after_save_for_transaction; end
111115
def after_create_for_transaction; end
112116

0 commit comments

Comments
 (0)