private Method

TagHelper.tag_options(options, escape = true)

There's no documentation for this item.

Source Code

# File action_view/helpers/tag_helper.rb, line 111
def tag_options(options, escape = true)
  unless options.blank?
    attrs = []
    if escape
      options.each do |key, value|
        next unless value
        key = key.to_s
        value = BOOLEAN_ATTRIBUTES.include?(key) ? key : escape_once(value)
        attrs << %(#{key}="#{value}")
      end
    else
      attrs = options.map { |key, value| %(#{key}="#{value}") }
    end
    " #{attrs.sort * ' '}" unless attrs.empty?
  end
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.