Class: Forme::Helper
- Inherits:
-
Object
- Object
- Forme::Helper
- Defined in:
- lib/forme/transformers/helper.rb
Overview
Default helper used by the library, using a spam 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.
9 10 11 12 13 14 |
# File 'lib/forme/transformers/helper.rb', line 9 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 |