Class: Formular::Element::Label
Overview
class Textarea
Direct Known Subclasses
Instance Method Summary collapse
-
#labeled_control_id ⇒ Object
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.
Instance Method Details
#labeled_control_id ⇒ Object
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 [:labeled_control].[:id] if [:labeled_control] return builder.path([:attribute_name]).to_encoded_id if [:attribute_name] && builder end |