rbexy 1.0.0 → 1.0.1
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/rbexy/version.rb +1 -1
- data/lib/rbexy/view_context_helper.rb +8 -4
- 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: 203d3f0d86ddbf38e11477ca082fec2bd1e4bc1e2843b4a74e08ea593f35a276
|
4
|
+
data.tar.gz: b41f015a023954be101bc01339eeee51f13893fc39918906a4e9d62b4bbfca6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d038e97f116998e004329938a371d510c7c96d034ab16a1bab0755971397d9020eb7c0459e2bf4f5e95acf9d9a6008b0d9cab208a36f9cab6d2fb7db8e953652
|
7
|
+
data.tar.gz: 503b6f70c7e2c7cfaa76e5dc77382cba4c6ecead1b7837d1870a025a71cf638a09bb1f96a5c74a7b8ac8aa7ef9cbcc030d1d109214fb8406d65eb46211c6fb3b
|
data/Gemfile.lock
CHANGED
data/lib/rbexy/version.rb
CHANGED
@@ -8,12 +8,16 @@ module Rbexy
|
|
8
8
|
@rbexy_context ||= [{}]
|
9
9
|
end
|
10
10
|
|
11
|
-
def rbexy_prep_output(*
|
12
|
-
return if
|
13
|
-
|
11
|
+
def rbexy_prep_output(*value)
|
12
|
+
return if value.length == 0
|
13
|
+
value = value.first
|
14
14
|
|
15
|
-
value =
|
15
|
+
value = rbexy_is_html_safe_array?(value) ? value.join.html_safe : value
|
16
16
|
[nil, false].include?(value) ? "" : value.to_s
|
17
17
|
end
|
18
|
+
|
19
|
+
def rbexy_is_html_safe_array?(value)
|
20
|
+
value.is_a?(Array) && value.all? { |v| v.respond_to?(:html_safe?) && v.html_safe? }
|
21
|
+
end
|
18
22
|
end
|
19
23
|
end
|