motor-admin 0.1.16 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/motor/api_query/build_json.rb +5 -5
- data/lib/motor/version.rb +1 -1
- data/ui/dist/{main-729641083f64367ce9aa.css.gz → main-c1f7e0cffddc2e2ac639.css.gz} +0 -0
- data/ui/dist/main-c1f7e0cffddc2e2ac639.js.gz +0 -0
- data/ui/dist/manifest.json +5 -5
- metadata +3 -3
- data/ui/dist/main-729641083f64367ce9aa.js.gz +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f394e032aa3ede14570c098e604143b439bd73c52b1c6fa2cfa800d413efcce
|
4
|
+
data.tar.gz: edd3909478589fc8cba218c1286fe00e18732b085435a7e02bfdf824c1f363ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aed05763bda0b00ceb45839f224720ed0c199d09590d439843557967c26eb4b3fed2a38cea39f81d2d8b39c8f90cca8a7df04e07475002b6dc7130dcc7513292
|
7
|
+
data.tar.gz: b744249ec9ef523f8c8563d3d98f782e4667ac90e00dc2b82ef9d59fe873838125f5298a7dcbc15c9901c57d9e74611199631e906a33dddaea490229ce058ff1
|
@@ -49,27 +49,27 @@ module Motor
|
|
49
49
|
|
50
50
|
params[:fields].each do |key, fields|
|
51
51
|
fields = fields.split(',') if fields.is_a?(String)
|
52
|
-
reflection_class = model.reflections[key]&.klass
|
53
|
-
fields_hash = build_fields_hash(reflection_class || model, fields)
|
54
52
|
|
55
53
|
if key == model_name || model_name.split('/').last == key
|
56
|
-
json_params.merge!(
|
54
|
+
json_params.merge!(build_fields_hash(model, fields))
|
57
55
|
else
|
58
56
|
hash = find_key_in_params(json_params, key)
|
59
57
|
|
58
|
+
fields_hash = build_fields_hash(model.reflections[key]&.klass, fields)
|
59
|
+
|
60
60
|
hash.merge!(fields_hash)
|
61
61
|
end
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
65
|
def build_fields_hash(model, fields)
|
66
|
-
columns = model.columns.map(&:name)
|
66
|
+
columns = model ? model.columns.map(&:name) : []
|
67
67
|
fields_hash = { 'only' => [], 'methods' => [] }
|
68
68
|
|
69
69
|
fields.each_with_object(fields_hash) do |field, acc|
|
70
70
|
if field.in?(columns)
|
71
71
|
acc['only'] << field
|
72
|
-
elsif model.instance_methods.include?(field.to_sym)
|
72
|
+
elsif model.nil? || model.instance_methods.include?(field.to_sym)
|
73
73
|
acc['methods'] << field
|
74
74
|
end
|
75
75
|
end
|
data/lib/motor/version.rb
CHANGED
File without changes
|
Binary file
|
data/ui/dist/manifest.json
CHANGED
@@ -5,9 +5,9 @@
|
|
5
5
|
"fonts/ionicons.ttf?v=3.0.0-alpha.3": "fonts/ionicons.ttf",
|
6
6
|
"fonts/ionicons.woff2?v=3.0.0-alpha.3": "fonts/ionicons.woff2",
|
7
7
|
"fonts/ionicons.woff?v=3.0.0-alpha.3": "fonts/ionicons.woff",
|
8
|
-
"main-
|
9
|
-
"main-
|
10
|
-
"main-
|
11
|
-
"main.css": "main-
|
12
|
-
"main.js": "main-
|
8
|
+
"main-c1f7e0cffddc2e2ac639.css.gz": "main-c1f7e0cffddc2e2ac639.css.gz",
|
9
|
+
"main-c1f7e0cffddc2e2ac639.js.LICENSE.txt": "main-c1f7e0cffddc2e2ac639.js.LICENSE.txt",
|
10
|
+
"main-c1f7e0cffddc2e2ac639.js.gz": "main-c1f7e0cffddc2e2ac639.js.gz",
|
11
|
+
"main.css": "main-c1f7e0cffddc2e2ac639.css",
|
12
|
+
"main.js": "main-c1f7e0cffddc2e2ac639.js"
|
13
13
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motor-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pete Matsyburka
|
@@ -213,8 +213,8 @@ files:
|
|
213
213
|
- lib/motor/ui_configs.rb
|
214
214
|
- lib/motor/version.rb
|
215
215
|
- ui/dist/fonts/ionicons.woff2
|
216
|
-
- ui/dist/main-
|
217
|
-
- ui/dist/main-
|
216
|
+
- ui/dist/main-c1f7e0cffddc2e2ac639.css.gz
|
217
|
+
- ui/dist/main-c1f7e0cffddc2e2ac639.js.gz
|
218
218
|
- ui/dist/manifest.json
|
219
219
|
homepage:
|
220
220
|
licenses:
|
Binary file
|