Module: CornStarch::FieldHelper

Defined in:
app/helpers/corn_starch/field_helper.rb

Overview

Field Helper

Instance Method Summary collapse

Instance Method Details

#field_dsp_tag(name, v = nil, &block) ⇒ Object

Show Field Tag



11
12
13
14
15
16
# File 'app/helpers/corn_starch/field_helper.rb', line 11

def field_dsp_tag name, v = nil, &block
  args = []
  args.push v if v
  args.push class: 'cs-field-value'
  span_tag(name, class: 'cs-field-name') + span_tag(*args, &block)
end