item_models 0.0.7 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0214e0787fb28bfa06ffb646c088a0de1bb501576fab9edbda16cf07e1d2ea7
4
- data.tar.gz: 49fb1f77bd36cbb18df9624f0f90a59fab4382acfc428b7be9c16fa0be8d1a1f
3
+ metadata.gz: bb96da1dbc312df41c471bb7c1d190651861ec35ba514191cbde64c953d42e87
4
+ data.tar.gz: 9ed39f1f0100d8364badd6c9929a9c407f18e24f618f49007d8a9ebd77dd184b
5
5
  SHA512:
6
- metadata.gz: 194e8ae07352faf9bbcdc008f096cad4dd6c0641946b86a41e97061dfc707b4ea483850c58ba744b6f508640429072d1447b8bc14b025351b44c2155660bbe21
7
- data.tar.gz: ce5f99a81915dc797bb9dd63ebfe25e1200278d13b75b28099e612e2bd533f8b906cb5be9421daa6ccf83b355e08a69dded0c656944e032c71843140c2df0b11
6
+ metadata.gz: 818b4a0d2d0e0b3806c6f53bee5a266257f71a79f1e85dff3dc56df213b874d06454a57a18c9b54873b1169efe4561594e6fa6b6976532dcb952e1dc9547eaf1
7
+ data.tar.gz: d3459e4b7dacc12a3925c245beaf87911be3e5a898ea04ed0f5c8984897260b9db4a75ec181daf2ab501f3799aa2875f6742ba11dd7ee2c9a379dee5e99fdd86
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ItemModels
4
- VERSION = '0.0.7'
4
+ VERSION = '0.0.12'
5
5
  end
@@ -10,4 +10,7 @@ class ItemListing < ItemApplicationRecord
10
10
  has_many :item_listing_variant_custom_fields, foreign_key: :channel_association_id
11
11
  has_many :item_listing_custom_fields, foreign_key: :channel_association_id
12
12
  has_many :item_listing_variant_images, foreign_key: :channel_association_id
13
+ has_one :category,
14
+ dependent: :destroy,
15
+ autosave: true
13
16
  end
@@ -5,6 +5,8 @@ class VariantListing < ItemApplicationRecord
5
5
 
6
6
  belongs_to :variant
7
7
  belongs_to :item_listing
8
- has_many :variant_listing_stock_allocations, foreign_key: :variant_association_id
8
+ has_one :variant_listing_stock_allocation,
9
+ class_name: 'VariantListingStockAllocation',
10
+ foreign_key: :variant_association_id
9
11
  has_many :variant_listing_price_histories, foreign_key: :variant_association_id
10
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: item_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - alexander
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-11 00:00:00.000000000 Z
11
+ date: 2020-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
- description:
55
+ description:
56
56
  email:
57
57
  - alxibra@gmail.com
58
58
  executables: []
@@ -84,11 +84,11 @@ files:
84
84
  - lib/models/variant_listing_stock_allocation.rb
85
85
  - lib/models/variant_option.rb
86
86
  - lib/models/variant_option_association.rb
87
- homepage:
87
+ homepage:
88
88
  licenses:
89
89
  - MIT
90
90
  metadata: {}
91
- post_install_message:
91
+ post_install_message:
92
92
  rdoc_options: []
93
93
  require_paths:
94
94
  - lib
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  requirements: []
107
107
  rubygems_version: 3.0.3
108
- signing_key:
108
+ signing_key:
109
109
  specification_version: 4
110
110
  summary: gem for active record item models
111
111
  test_files: []