class Forme::Helper

  1. lib/forme/bs5.rb
  2. lib/forme/transformers/helper.rb
  3. show all
Superclass: Object

Default helper used by the library, using a span with “helper” class

Registered as :default.

Methods

Public Instance

  1. call

Classes and Modules

  1. Forme::Helper::Bootstrap5

Public Instance methods

call(tag, input)

Return tag with help message span tag after it.

[show source]
   # File lib/forme/transformers/helper.rb
11 def call(tag, input)
12   attr = input.opts[:helper_attr]
13   attr = attr ? attr.dup : {}
14   Forme.attr_classes(attr, 'helper')
15   [tag, input.tag(:span, attr, input.opts[:help])]
16 end