lib/lifeform/libraries/default/input.rb in lifeform-0.12.0 vs lib/lifeform/libraries/default/input.rb in lifeform-0.13.0

- old
+ new

@@ -53,11 +53,10 @@ end def template(&block) # rubocop:disable Metrics/AbcSize return "" if !@if.nil? && !@if - wrapper_tag = dashed self.class.const_get(:WRAPPER_TAG) input_tag = dashed self.class.const_get(:INPUT_TAG) closing_tag = input_tag != "input" field_body = html -> { <<~HTML # rubocop:disable Bridgetown/HTMLEscapedHeredoc #{html(@label || -> {}).to_s.strip} @@ -66,11 +65,12 @@ } #{html -> { capture(self, &block) } if block} HTML } - return field_body unless wrapper_tag + return field_body unless self.class.const_get(:WRAPPER_TAG) + wrapper_tag = dashed self.class.const_get(:WRAPPER_TAG) html -> { <<~HTML # rubocop:disable Bridgetown/HTMLEscapedHeredoc <#{wrapper_tag} #{html_attributes name: @attributes[:name]}>#{field_body.to_s.strip}</#{wrapper_tag}> HTML } end