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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 07e978bd7062d93d342a6048d51a54559abecf20098ae39eda81c10497856578
4
- data.tar.gz: 30c5714c27d7a892da6eb591a4c3e98cae860d0d971d47932e7eed2f127fe1da
3
+ metadata.gz: c814b751d3d8dd050595b4d29aa7a261dd0b5dbb15787912a58e676fe09d76a9
4
+ data.tar.gz: 1c9bb1ff0df9584b34a7e9e67a4698a04569d985b0406f9e9d79e60d2abe160f
5
5
  SHA512:
6
- metadata.gz: 5ab143d433e88c413810036f0b53cc3f70c3eb74c75b0d5fb4f319b94c44ba9b62b003156274a95d67aa048623edeeafab45fc6e0bcc17875817c980f956126d
7
- data.tar.gz: 502f58b8543f1b31ba0700a24da4588875945b38f54bf26ac411fa13b88c304f9d2250d822357e327a689ec58863b2d3651d16bb09ed20f7c486c24193259888
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(time_zone_options_for_select(@selected, @priority_zones, @zone_model)))
44
+ el.raw(el.safe(options_html))
38
45
  end
39
46
  end
40
47
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PhlexForms
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phlex-forms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikael Henriksson