Method: YMDP::FormTagHelper#label
- Defined in:
- lib/ymdp/view/asset_tag_helper.rb
#label(name, content_or_options = nil, options = {}) ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/ymdp/view/asset_tag_helper.rb', line 48 def label(name, = nil, = {}) if .is_a?(Hash) = text = name else text = || name end [:id] ||= "#{name.downcase}_label" [:for] ||= name.downcase content_tag("label", text, ) end |