aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/tagging.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/models/tagging.rb')
-rw-r--r--activerecord/test/models/tagging.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/models/tagging.rb b/activerecord/test/models/tagging.rb
index 861fde633f..6d4230f6f4 100644
--- a/activerecord/test/models/tagging.rb
+++ b/activerecord/test/models/tagging.rb
@@ -14,3 +14,7 @@ class Tagging < ActiveRecord::Base
belongs_to :taggable, polymorphic: true, counter_cache: :tags_count
has_many :things, through: :taggable
end
+
+class IndestructibleTagging < Tagging
+ before_destroy { throw :abort }
+end