module ActionView::Helpers::TagHelper

Public Instance Methods

tag(name, options = nil, open = false, escape = true) click to toggle source

This re-opens the tag method which is used by every form builder helper to disable browsers autocomplete by default.

Fields can use the browsers autocomplete by explicitly setting β€œ:autocomplete => β€˜on’”

# File lib/autocomplete-off.rb, line 16
def tag(name, options = nil, open = false, escape = true)
  options['autocomplete'] ||= 'off' if options.is_a?(Hash) and name.to_s == 'input' and not ['submit', 'reset', 'radio', 'image', 'file', 'hidden', 'checkbox'].include?(options['type'].to_s)
  tag_without_autocomplete_off(name, options, open, escape)
end
Also aliased as: tag_without_autocomplete_off
tag_without_autocomplete_off(name, options = nil, open = false, escape = true)

rename original method for extending

Alias for: tag