schema_dot_org 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/schema_dot_org.rb +8 -1
- data/lib/schema_dot_org/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db371250ff6b29c349d658e85503ab19412d35e491a9800827f129f9d93413d0
|
4
|
+
data.tar.gz: e429bee64238b2f43697cd2f7bb95984eda07389573b9148008bfe2f0c84079b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e55d94f56727c50903971dfe8b88ecbb1193e7132e62b4f30d5a65bd2eb34f00ac3c6dd35f2857190bd86982c0dbc2c1f2d0ffb0131b85913e060df93901643f
|
7
|
+
data.tar.gz: 98c43a569614deccbacfbadc7e587b309f8a78975aa03e06c60f47a4fb653cdb3087ac3b4fb2b129e27691a673a5e955102261b206af99d941ae645e46087993
|
data/lib/schema_dot_org.rb
CHANGED
@@ -11,7 +11,14 @@ module SchemaDotOrg
|
|
11
11
|
|
12
12
|
|
13
13
|
def to_s
|
14
|
-
to_json_ld(pretty: true)
|
14
|
+
json_string = to_json_ld(pretty: true)
|
15
|
+
|
16
|
+
# Mark as safe if we're in Rails
|
17
|
+
if json_string.respond_to?(:html_safe)
|
18
|
+
json_string.html_safe
|
19
|
+
else
|
20
|
+
json_string
|
21
|
+
end
|
15
22
|
end
|
16
23
|
|
17
24
|
|