Sha256: 20d16636494a962fb4ae737516473f6bee9820db5e8eca0b90a541b3b0470b41

Contents?: true

Size: 363 Bytes

Versions: 6

Compression:

Stored size: 363 Bytes

Contents

# 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

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
ibm_db-5.5.0 test/models/shop.rb
ibm_db-5.4.1 test/models/shop.rb
ibm_db-5.4.0 test/models/shop.rb
ibm_db-5.3.2 test/models/shop.rb
ibm_db-5.3.1 test/models/shop.rb
ruby-on-quails-0.1.0 activerecord/test/models/shop.rb