module ActionView::Helpers::UrlHelper
def convert_boolean_attributes!(html_options, bool_attrs)
convert_boolean_attributes!( html_options,
Example:
in place.
Returns the updated +html_options+ hash, which is also modified
http://www.w3.org/TR/xhtml1/#h-4.5)
section 4.5 "Attribute Minimization" for more:
removed from the +html_options+ hash. (See the XHTML 1.0 spec,
replaced with the attribute's name; otherwise the attribute is
if the associated +bool_value+ evaluates to true, it is
"attr" => bool_value
given as:
More specifically, for each boolean attribute in +html_options+
its name is listed in the given +bool_attrs+ array.)
HTML/XHTML. (An attribute is considered to be boolean if
attributes from true/false form into the form required by
Processes the +html_options+ hash, converting the boolean
def convert_boolean_attributes!(html_options, bool_attrs) bool_attrs.each { |x| html_options[x] = x if html_options.delete(x) } html_options end