Sha256: c84a5d60bd66c53246eb952bb2891e94366998c7fc12d2272a2a08377aa5c0c1
Contents?: true
Size: 548 Bytes
Versions: 8
Compression:
Stored size: 548 Bytes
Contents
module GOVUKDesignSystemFormBuilder module Containers class FormGroup < GOVUKDesignSystemFormBuilder::Base def initialize(builder, object_name, attribute_name) super(builder, object_name, attribute_name) end def html @builder.content_tag('div', class: form_group_classes) do yield end end private def form_group_classes %w(govuk-form-group).tap do |classes| classes.push('govuk-form-group--error') if has_errors? end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems