class Forme::Helper

  1. lib/forme/transformers/helper.rb
Superclass: Object

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

Registered as :default.

Methods

Public Instance

  1. call

Public Instance methods

call (tag, input)

Return tag with error message span tag after it.

[show source]
# 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