phlex-forms 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/forms/time_zone_select.rb +8 -1
- data/lib/phlex_forms/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: c814b751d3d8dd050595b4d29aa7a261dd0b5dbb15787912a58e676fe09d76a9
|
|
4
|
+
data.tar.gz: 1c9bb1ff0df9584b34a7e9e67a4698a04569d985b0406f9e9d79e60d2abe160f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6d86f0ca8fa5497a118b5e137e9bd23b67a68b4db6076cad19a38d6dc4bad4e3d42a5b3958077666e5f1370658b6069dc9787d816c3904c4717c5f5725d7cac0
|
|
7
|
+
data.tar.gz: fbe09ab98824da11331b9a6d4abaf502356bb617157b12a68a82096eab790b2d5e794bd2457e8ccd94651e418b69dbab76317e3bfb6542f7dfe7d60d37479d25
|
|
@@ -32,9 +32,16 @@ module Forms
|
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
def view_template
|
|
35
|
+
# Build the options on `self` — the TimeZoneOptionsForSelect helper is
|
|
36
|
+
# included here, NOT on the yielded DaisyUI::Select (`el`), so calling it
|
|
37
|
+
# inside the block would raise NoMethodError.
|
|
38
|
+
# time_zone_options_for_select returns an HTML-safe buffer; Phlex's `safe`
|
|
39
|
+
# expects a plain String, so coerce with #to_s before marking it safe.
|
|
40
|
+
options_html = time_zone_options_for_select(@selected, @priority_zones, @zone_model).to_s
|
|
41
|
+
|
|
35
42
|
render DaisyUI::Select.new(*daisy_modifiers, **select_attributes) do |el|
|
|
36
43
|
render_placeholder(el) if @placeholder || @include_blank
|
|
37
|
-
el.raw(el.safe(
|
|
44
|
+
el.raw(el.safe(options_html))
|
|
38
45
|
end
|
|
39
46
|
end
|
|
40
47
|
|
data/lib/phlex_forms/version.rb
CHANGED