xsdk-scaffold-rails 0.1.4 → 0.1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -2
- data/Gemfile.lock +14 -123
- data/lib/xsdk/scaffold/rails/errors.rb +32 -0
- data/lib/xsdk/scaffold/rails/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30b218c1e575049e061795da3be9e65dea45ef54bb94e55a4fa0fa0933e28e0c
|
4
|
+
data.tar.gz: 3c81b1cc180bc63706558fa3ba4caf8c8b61c555c52411f7dfb85f8d5cc175f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05e3d765720bd2ef48b8de6325c37c6169d5d82fc05edf84e74e521657be33d1e43d20968f5c297977500e461fb1932368b30339babfd796a51b4c5a1077e08f
|
7
|
+
data.tar.gz: e275b477008f18fd0a5dfbbd80daf9bb5f7e41b4d41c8f818d166c8dc63185a4356be1dc2308f57f78d292113fee0f1971e31abf2dcf542b9dbd3daa6fe2269b
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,130 +1,34 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
xsdk-scaffold-rails (0.1.4)
|
4
|
+
xsdk-scaffold-rails (0.1.4.1)
|
5
5
|
activerecord (>= 6.0.0)
|
6
6
|
pg (>= 1.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
activejob (= 6.0.0)
|
18
|
-
activerecord (= 6.0.0)
|
19
|
-
activestorage (= 6.0.0)
|
20
|
-
activesupport (= 6.0.0)
|
21
|
-
mail (>= 2.7.1)
|
22
|
-
actionmailer (6.0.0)
|
23
|
-
actionpack (= 6.0.0)
|
24
|
-
actionview (= 6.0.0)
|
25
|
-
activejob (= 6.0.0)
|
26
|
-
mail (~> 2.5, >= 2.5.4)
|
27
|
-
rails-dom-testing (~> 2.0)
|
28
|
-
actionpack (6.0.0)
|
29
|
-
actionview (= 6.0.0)
|
30
|
-
activesupport (= 6.0.0)
|
31
|
-
rack (~> 2.0)
|
32
|
-
rack-test (>= 0.6.3)
|
33
|
-
rails-dom-testing (~> 2.0)
|
34
|
-
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
35
|
-
actiontext (6.0.0)
|
36
|
-
actionpack (= 6.0.0)
|
37
|
-
activerecord (= 6.0.0)
|
38
|
-
activestorage (= 6.0.0)
|
39
|
-
activesupport (= 6.0.0)
|
40
|
-
nokogiri (>= 1.8.5)
|
41
|
-
actionview (6.0.0)
|
42
|
-
activesupport (= 6.0.0)
|
43
|
-
builder (~> 3.1)
|
44
|
-
erubi (~> 1.4)
|
45
|
-
rails-dom-testing (~> 2.0)
|
46
|
-
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
47
|
-
activejob (6.0.0)
|
48
|
-
activesupport (= 6.0.0)
|
49
|
-
globalid (>= 0.3.6)
|
50
|
-
activemodel (6.0.0)
|
51
|
-
activesupport (= 6.0.0)
|
52
|
-
activerecord (6.0.0)
|
53
|
-
activemodel (= 6.0.0)
|
54
|
-
activesupport (= 6.0.0)
|
55
|
-
activestorage (6.0.0)
|
56
|
-
actionpack (= 6.0.0)
|
57
|
-
activejob (= 6.0.0)
|
58
|
-
activerecord (= 6.0.0)
|
59
|
-
marcel (~> 0.3.1)
|
60
|
-
activesupport (6.0.0)
|
11
|
+
activemodel (6.1.3.2)
|
12
|
+
activesupport (= 6.1.3.2)
|
13
|
+
activerecord (6.1.3.2)
|
14
|
+
activemodel (= 6.1.3.2)
|
15
|
+
activesupport (= 6.1.3.2)
|
16
|
+
activesupport (6.1.3.2)
|
61
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
62
|
-
i18n (>=
|
63
|
-
minitest (
|
64
|
-
tzinfo (~>
|
65
|
-
zeitwerk (~> 2.
|
18
|
+
i18n (>= 1.6, < 2)
|
19
|
+
minitest (>= 5.1)
|
20
|
+
tzinfo (~> 2.0)
|
21
|
+
zeitwerk (~> 2.3)
|
66
22
|
ast (2.4.2)
|
67
|
-
builder (3.2.4)
|
68
23
|
concurrent-ruby (1.1.8)
|
69
|
-
crass (1.0.6)
|
70
24
|
diff-lcs (1.4.4)
|
71
|
-
erubi (1.10.0)
|
72
|
-
globalid (0.4.2)
|
73
|
-
activesupport (>= 4.2.0)
|
74
25
|
i18n (1.8.10)
|
75
26
|
concurrent-ruby (~> 1.0)
|
76
|
-
loofah (2.9.1)
|
77
|
-
crass (~> 1.0.2)
|
78
|
-
nokogiri (>= 1.5.9)
|
79
|
-
mail (2.7.1)
|
80
|
-
mini_mime (>= 0.1.1)
|
81
|
-
marcel (0.3.3)
|
82
|
-
mimemagic (~> 0.3.2)
|
83
|
-
method_source (1.0.0)
|
84
|
-
mimemagic (0.3.10)
|
85
|
-
nokogiri (~> 1)
|
86
|
-
rake
|
87
|
-
mini_mime (1.1.0)
|
88
|
-
mini_portile2 (2.5.1)
|
89
27
|
minitest (5.14.4)
|
90
|
-
nio4r (2.5.7)
|
91
|
-
nokogiri (1.11.3)
|
92
|
-
mini_portile2 (~> 2.5.0)
|
93
|
-
racc (~> 1.4)
|
94
28
|
parallel (1.20.1)
|
95
29
|
parser (3.0.1.1)
|
96
30
|
ast (~> 2.4.1)
|
97
31
|
pg (1.2.3)
|
98
|
-
racc (1.5.2)
|
99
|
-
rack (2.2.3)
|
100
|
-
rack-test (1.1.0)
|
101
|
-
rack (>= 1.0, < 3)
|
102
|
-
rails (6.0.0)
|
103
|
-
actioncable (= 6.0.0)
|
104
|
-
actionmailbox (= 6.0.0)
|
105
|
-
actionmailer (= 6.0.0)
|
106
|
-
actionpack (= 6.0.0)
|
107
|
-
actiontext (= 6.0.0)
|
108
|
-
actionview (= 6.0.0)
|
109
|
-
activejob (= 6.0.0)
|
110
|
-
activemodel (= 6.0.0)
|
111
|
-
activerecord (= 6.0.0)
|
112
|
-
activestorage (= 6.0.0)
|
113
|
-
activesupport (= 6.0.0)
|
114
|
-
bundler (>= 1.3.0)
|
115
|
-
railties (= 6.0.0)
|
116
|
-
sprockets-rails (>= 2.0.0)
|
117
|
-
rails-dom-testing (2.0.3)
|
118
|
-
activesupport (>= 4.2.0)
|
119
|
-
nokogiri (>= 1.6)
|
120
|
-
rails-html-sanitizer (1.3.0)
|
121
|
-
loofah (~> 2.3)
|
122
|
-
railties (6.0.0)
|
123
|
-
actionpack (= 6.0.0)
|
124
|
-
activesupport (= 6.0.0)
|
125
|
-
method_source
|
126
|
-
rake (>= 0.8.7)
|
127
|
-
thor (>= 0.20.3, < 2.0)
|
128
32
|
rainbow (3.0.0)
|
129
33
|
rake (12.3.3)
|
130
34
|
regexp_parser (2.1.1)
|
@@ -160,28 +64,15 @@ GEM
|
|
160
64
|
rubocop (~> 1.0)
|
161
65
|
rubocop-ast (>= 1.1.0)
|
162
66
|
ruby-progressbar (1.11.0)
|
163
|
-
|
67
|
+
tzinfo (2.0.4)
|
164
68
|
concurrent-ruby (~> 1.0)
|
165
|
-
rack (> 1, < 3)
|
166
|
-
sprockets-rails (3.2.2)
|
167
|
-
actionpack (>= 4.0)
|
168
|
-
activesupport (>= 4.0)
|
169
|
-
sprockets (>= 3.0.0)
|
170
|
-
thor (1.1.0)
|
171
|
-
thread_safe (0.3.6)
|
172
|
-
tzinfo (1.2.9)
|
173
|
-
thread_safe (~> 0.1)
|
174
69
|
unicode-display_width (1.7.0)
|
175
|
-
websocket-driver (0.7.3)
|
176
|
-
websocket-extensions (>= 0.1.0)
|
177
|
-
websocket-extensions (0.1.5)
|
178
70
|
zeitwerk (2.4.2)
|
179
71
|
|
180
72
|
PLATFORMS
|
181
|
-
|
73
|
+
x86_64-darwin-20
|
182
74
|
|
183
75
|
DEPENDENCIES
|
184
|
-
rails (~> 6.0.0.0)
|
185
76
|
rake (~> 12.0)
|
186
77
|
rspec (~> 3.0)
|
187
78
|
rubocop (~> 1.3.1)
|
@@ -190,4 +81,4 @@ DEPENDENCIES
|
|
190
81
|
xsdk-scaffold-rails!
|
191
82
|
|
192
83
|
BUNDLED WITH
|
193
|
-
2.
|
84
|
+
2.2.17
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Xsdk
|
3
|
+
|
4
|
+
module Errors
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
def errors
|
8
|
+
local_errors = super()
|
9
|
+
keys = self.class.reflect_on_all_associations.select do |assoc|
|
10
|
+
self.class.nested_attributes_options.key? assoc.name
|
11
|
+
end
|
12
|
+
keys.each do |assoc|
|
13
|
+
name_assoc = assoc.name
|
14
|
+
local_errors.delete(name_assoc)
|
15
|
+
model_assoc = send(name_assoc)
|
16
|
+
next if model_assoc.nil?
|
17
|
+
|
18
|
+
row_errors = {}
|
19
|
+
if assoc.macro == :belongs_to
|
20
|
+
row_errors[model_assoc._uuid] = model_assoc.errors.messages if model_assoc.errors.messages.keys.any?
|
21
|
+
else
|
22
|
+
model_assoc.each do |row|
|
23
|
+
row_errors[row._uuid] = row.errors.messages if row.errors.messages.keys.any?
|
24
|
+
end
|
25
|
+
end
|
26
|
+
local_errors.add(name_assoc, row_errors) if row_errors.keys.any?
|
27
|
+
end
|
28
|
+
local_errors
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xsdk-scaffold-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.4
|
4
|
+
version: 0.1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Davide Croci
|
@@ -100,6 +100,7 @@ files:
|
|
100
100
|
- lib/xsdk/scaffold/rails.rb
|
101
101
|
- lib/xsdk/scaffold/rails/base_datatable.rb
|
102
102
|
- lib/xsdk/scaffold/rails/base_search.rb
|
103
|
+
- lib/xsdk/scaffold/rails/errors.rb
|
103
104
|
- lib/xsdk/scaffold/rails/version.rb
|
104
105
|
- xsdk-scaffold-rails.gemspec
|
105
106
|
homepage: https://ermes-x.com
|