Sha256: b08eaa36f9b65d5ef95aab2f14339e58f6df5aed232c8ba6264bccae92f0d40b

Contents?: true

Size: 338 Bytes

Versions: 18

Compression:

Stored size: 338 Bytes

Contents

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

18 entries across 18 versions & 2 rubygems

Version Path
ibm_db-5.2.0 test/models/shop.rb
ibm_db-5.1.0 test/models/shop.rb
ibm_db-5.0.5 test/models/shop.rb
ibm_db-5.0.4 test/models/shop.rb
ibm_db-5.0.3 test/models/shop.rb
ibm_db-5.0.2 test/models/shop.rb
ibm_db-4.0.0-x86-mingw32 test/models/shop.rb
ibm_db-4.0.0 test/models/shop.rb
ibm_db-3.0.4-x86-mingw32 test/models/shop.rb
ibm_db-3.0.4 test/models/shop.rb
ibm_db-3.0.3-x86-mingw32 test/models/shop.rb
ibm_db-3.0.3 test/models/shop.rb
ibm_db-3.0.2-x86-mingw32 test/models/shop.rb
ibm_db-3.0.2 test/models/shop.rb
activejob-lock-0.0.2 rails/activerecord/test/models/shop.rb
ibm_db-3.0.1 test/models/shop.rb
ibm_db-3.0.1-x86-mingw32 test/models/shop.rb
activejob-lock-0.0.1 rails/activerecord/test/models/shop.rb