phlexi-field 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2ff865f069b2361127071190b6f17cd58a553d9eadcb3084acce2e3cefbe6df
|
4
|
+
data.tar.gz: 6af6e7c11737780a668ea39f86a6436540afa31e2f76a14d0201177e336ff649
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 617357cb149cc34431f4615ecc041207565a00e3855400fe804bd18c162af9c4e7b182a49d73c8d01deb122a087969531883316e3b1571595d72a7dbab56e84e
|
7
|
+
data.tar.gz: afbfa1cefd2b4a31898e9aa90636f642395fc4d33d57b58989d3aaa8977232ce9d4d1b91602f1f63b4375854f2961de82935b88a5b11c5291fe90a0b55336907
|
@@ -55,7 +55,7 @@ module Phlexi
|
|
55
55
|
# Check if object is a has that contains key
|
56
56
|
if object.respond_to?(:fetch)
|
57
57
|
# Fallback to inferring type from the value
|
58
|
-
return infer_field_type_from_value(object
|
58
|
+
return infer_field_type_from_value(object[key])
|
59
59
|
end
|
60
60
|
|
61
61
|
# Default to string if we can't determine the type
|
@@ -108,7 +108,7 @@ module Phlexi
|
|
108
108
|
# a method call. For example, a `Hash` would be accessed via `user[:email]` instead of `user.send(:email)`
|
109
109
|
def object_value_for(key:)
|
110
110
|
return @object.send(key) if @object.respond_to?(key)
|
111
|
-
@object
|
111
|
+
@object[key] if @object.is_a?(Hash)
|
112
112
|
end
|
113
113
|
|
114
114
|
private
|
data/lib/phlexi/field/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phlexi-field
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Froelich
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: phlex
|