class Formular::Element::Label
Public Instance Methods
labeled_control_id()
click to toggle source
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.
# 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