lib/lifeform/libraries/default/input.rb in lifeform-0.9.0 vs lib/lifeform/libraries/default/input.rb in lifeform-0.10.0
- old
+ new
@@ -1,11 +1,12 @@
# frozen_string_literal: true
module Lifeform
module Libraries
class Default
- class Input < Phlex::View
+ class Input < Phlex::HTML
+ using RefineProcToString
include CapturingRenderable
attr_reader :form, :field_definition, :attributes
WRAPPER_TAG = :form_field
@@ -48,10 +49,10 @@
label_name = (attributes[:id] || attributes[:name]).to_s
@attributes = attributes.filter_map { |k, v| [k, v] unless k == :label }.to_h
proc {
- label(for: label_name) { raw label_text }
+ label(for: label_name) { unsafe_raw label_text }
}
end
def template(&block)
return if !@if.nil? && !@if