aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-04-10 17:55:03 +0900
committerRyuta Kamizono <kamipo@gmail.com>2019-04-10 17:59:29 +0900
commit5f261d04d6f857d49c75124df809adfbd6cd5b5e (patch)
tree6bdffd96373b85eb852e6b5795c5c101eed916ac /activerecord/test/models
parentb33ccaa6c335e2ce482c9de1aa05e4a612aa84bc (diff)
downloadrails-5f261d04d6f857d49c75124df809adfbd6cd5b5e.tar.gz
rails-5f261d04d6f857d49c75124df809adfbd6cd5b5e.tar.bz2
rails-5f261d04d6f857d49c75124df809adfbd6cd5b5e.zip
Revert "Remove unused callbacks in the `Topic` model"
This reverts commit b33ccaa6c335e2ce482c9de1aa05e4a612aa84bc. 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
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/topic.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/models/topic.rb b/activerecord/test/models/topic.rb
index 5cc3179e3f..77101090f2 100644
--- a/activerecord/test/models/topic.rb
+++ b/activerecord/test/models/topic.rb
@@ -56,7 +56,9 @@ class Topic < ActiveRecord::Base
alias_attribute :heading, :title
+ before_validation :before_validation_for_transaction
before_save :before_save_for_transaction
+ before_destroy :before_destroy_for_transaction
after_save :after_save_for_transaction
after_create :after_create_for_transaction
@@ -106,7 +108,9 @@ class Topic < ActiveRecord::Base
end
end
+ def before_validation_for_transaction; end
def before_save_for_transaction; end
+ def before_destroy_for_transaction; end
def after_save_for_transaction; end
def after_create_for_transaction; end