Class: Forme::Helper
- Inherits:
-
Object
- Object
- Forme::Helper
- Defined in:
- lib/forme/transformers/helper.rb
Overview
Default helper used by the library, using a span with “helper” class
Registered as :default.
Instance Method Summary collapse
-
#call(tag, input) ⇒ Object
Return tag with error message span tag after it.
Instance Method Details
#call(tag, input) ⇒ Object
Return tag with error message span tag after it.
11 12 13 14 15 16 |
# File 'lib/forme/transformers/helper.rb', line 11 def call(tag, input) attr = input.opts[:helper_attr] attr = attr ? attr.dup : {} Forme.attr_classes(attr, 'helper') [tag, input.tag(:span, attr, input.opts[:help])] end |