Class: Formular::Element::Label

Inherits:
Container
  • Object
show all
Defined in:
lib/formular/elements.rb

Overview

class Textarea

Instance Method Summary collapse

Instance Method Details

#labeled_control_idObject

as per MDN A label element can have both a ‘for’ attribute and a contained control element, as long as the for attribute points to the contained control element.



154
155
156
157
# File 'lib/formular/elements.rb', line 154

def labeled_control_id
  return options[:labeled_control].options[:id] if options[:labeled_control]
  return builder.path(options[:attribute_name]).to_encoded_id if options[:attribute_name] && builder
end