iknow_view_models 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/iknow_view_models/version.rb +1 -1
- data/lib/view_model/active_record/cloner.rb +2 -5
- data/shell.nix +1 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0ca9443ae6c4495fe76be75142603808e37206f1a5f691692618fd650e49582
|
4
|
+
data.tar.gz: d2baff7ccc9b188439d9545b4ebf69d7985e6db56b382c9d06c749a931f6ae7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fbed7379cfa330b9dac84497ca76e9dada5d3400cb188541f28394548b99a717a84e42d8d5edf6d62fd139b8484a050824aec9ba0a1ec0f76e660075b82bfa5
|
7
|
+
data.tar.gz: 6f37c4911fca2a124e9e57cdfefb027610bb4f4bd5286878db125d8588c49b22f5d0a67a218e3971bef51b111ca9eac7299dfc6eaa4fa642d800ac6226141eec
|
@@ -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
|
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
|
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.
|
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-
|
11
|
+
date: 2019-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|