diff options
Diffstat (limited to 'activerecord/test/models/shop.rb')
-rw-r--r-- | activerecord/test/models/shop.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/activerecord/test/models/shop.rb b/activerecord/test/models/shop.rb new file mode 100644 index 0000000000..92afe70b92 --- /dev/null +++ b/activerecord/test/models/shop.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Shop + class Collection < ActiveRecord::Base + has_many :products, dependent: :nullify + end + + class Product < ActiveRecord::Base + has_many :variants, dependent: :delete_all + belongs_to :type + + class Type < ActiveRecord::Base + has_many :products + end + end + + class Variant < ActiveRecord::Base + end +end |