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.
142 143 144 145 |
# File 'lib/formular/elements.rb', line 142 def labeled_control_id return [:labeled_control].attributes[:id] if [:labeled_control] return builder.path([:attribute_name]).to_encoded_id if [:attribute_name] && builder end |