diff options
Diffstat (limited to 'activerecord/test/models/parrot.rb')
-rw-r--r-- | activerecord/test/models/parrot.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/test/models/parrot.rb b/activerecord/test/models/parrot.rb index c4ee2bd19d..8c83de573f 100644 --- a/activerecord/test/models/parrot.rb +++ b/activerecord/test/models/parrot.rb @@ -19,5 +19,11 @@ class LiveParrot < Parrot end class DeadParrot < Parrot - belongs_to :killer, :class_name => 'Pirate' + belongs_to :killer, :class_name => 'Pirate', foreign_key: :killer_id +end + +class FunkyParrot < Parrot + before_destroy do + raise "before_destroy was called" + end end |