iknow_view_models 3.1.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9459a78038ecf77ab3855e7e4ea6a0899ac31fd3e7dd05be247d9e0b72284f3
4
- data.tar.gz: 34d662ae8733173dd3372ef9af5cd68b133848e1a94e5b1250624ec50dd4b0eb
3
+ metadata.gz: e0ca9443ae6c4495fe76be75142603808e37206f1a5f691692618fd650e49582
4
+ data.tar.gz: d2baff7ccc9b188439d9545b4ebf69d7985e6db56b382c9d06c749a931f6ae7c
5
5
  SHA512:
6
- metadata.gz: 7841f336c7f1604e3b2dbd54fb7209be02ecae7d19100707bef4ecc9b9ef2ae4d741f74d205fe468ac7ce9f14bd359d1b67b3ec1b76507ea9b51f812d0375972
7
- data.tar.gz: 6b7aaa8742bdb52afa77c37be699da4c4896ab25a1bb560e5b404506e4f97730dad6659c062ff1443bdb2f21ff120e205b888d3d742b372d9306062a515c8ad4
6
+ metadata.gz: 6fbed7379cfa330b9dac84497ca76e9dada5d3400cb188541f28394548b99a717a84e42d8d5edf6d62fd139b8484a050824aec9ba0a1ec0f76e660075b82bfa5
7
+ data.tar.gz: 6f37c4911fca2a124e9e57cdfefb027610bb4f4bd5286878db125d8588c49b22f5d0a67a218e3971bef51b111ca9eac7299dfc6eaa4fa642d800ac6226141eec
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IknowViewModels
4
- VERSION = '3.1.0'
4
+ VERSION = '3.1.1'
5
5
  end
@@ -33,12 +33,13 @@ class ViewModel::ActiveRecord::Cloner
33
33
 
34
34
  # visit the underlying viewmodel for each association, ignoring any
35
35
  # customization
36
+ ignored_associations = @ignored_associations
36
37
  node.class._members.each do |name, association_data|
37
38
  next unless association_data.is_a?(ViewModel::ActiveRecord::AssociationData)
38
39
 
39
40
  reflection = association_data.direct_reflection
40
41
 
41
- if association_ignored?(name)
42
+ if ignored_associations.include?(name)
42
43
  new_associated = nil
43
44
  else
44
45
  # Load the record associated with the old model
@@ -106,8 +107,4 @@ class ViewModel::ActiveRecord::Cloner
106
107
  def ignored?
107
108
  @ignored
108
109
  end
109
-
110
- def association_ignored?(name)
111
- @ignored_associations.include?(name.to_s)
112
- end
113
110
  end
data/shell.nix CHANGED
@@ -6,15 +6,5 @@ with import <nixpkgs> {};
6
6
 
7
7
  gemConfig = (defaultGemConfig.override { postgresql = postgresql_11; });
8
8
 
9
- ruby = ruby_2_6.overrideAttrs (attrs: {
10
- patches = (attrs.patches or []) ++ [
11
- # RubyGems has a regression where you can no longer build certain gems
12
- # outside their directory. Until this is merged, patch from the pull
13
- # request.
14
- (fetchpatch {
15
- url = https://patch-diff.githubusercontent.com/raw/rubygems/rubygems/pull/2596.patch;
16
- sha256 = "0m1s5brd30bqcr8v99sczihm83g270philx83kkw5bpix462fdm3";
17
- })
18
- ];
19
- });
9
+ ruby = ruby_2_6;
20
10
  }).env
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iknow_view_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - iKnow Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-03 00:00:00.000000000 Z
11
+ date: 2019-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord