active_element 0.0.30 → 0.0.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/active_element/default_controller/params.rb +10 -1
- data/lib/active_element/version.rb +1 -1
- 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: 4674930632a2913f699ce77bb0ee31d83b8e11a0356a013beaa6b7d740337a0a
|
4
|
+
data.tar.gz: 3d8ed9fde6a7a6072075afb7db1c12892ca5113b5beaf14221888fd7a7f96da8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 137906e98706fe08498ebebc90fb37d2ca85ba5dc2e4ca55411cc750c515312b55473f17b0815a554744d8db6fa0f5239c3c06dbef2d22098c07258242e4a37f
|
7
|
+
data.tar.gz: 45f050797338f9c7d6ebd47f203a2fb3db6974a92a160df50606c91a43d20cab7956dbfe3673d53c5283347825cafa273f92ee4a00654f6c30cfad058960b23b
|
data/Gemfile.lock
CHANGED
@@ -46,11 +46,20 @@ module ActiveElement
|
|
46
46
|
|
47
47
|
def scalar?(field)
|
48
48
|
return true if relation?(field)
|
49
|
-
return true if %i[json jsonb].exclude?(
|
49
|
+
return true if %i[json jsonb].exclude?(field_type(field))
|
50
50
|
|
51
51
|
false
|
52
52
|
end
|
53
53
|
|
54
|
+
def field_type(field)
|
55
|
+
options_proc = controller.active_element.state.field_options[field]
|
56
|
+
return column(field)&.type if options_proc.nil?
|
57
|
+
|
58
|
+
field_options = FieldOptions.from_state(field, controller.active_element.state, nil, controller)
|
59
|
+
options_proc.call(field_options)
|
60
|
+
field_options.type || column(field)&.type
|
61
|
+
end
|
62
|
+
|
54
63
|
def json_params(fields)
|
55
64
|
# XXX: We assume all non-scalar fields are JSON fields, i.e. they must have a definition
|
56
65
|
# defined as `config/forms/<model>/<field>.yml`. If that file does not exist, allow
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_element
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Farrell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootstrap
|