instance method
search_field
Ruby on Rails 3.0.20
Since v3.0.20Signature
search_field(object_name, method, options = {})
Returns a text_field of type “search”.
Parameters
-
object_namereq -
methodreq -
optionsopt = {}
Source
# File actionpack/lib/action_view/helpers/form_helper.rb, line 803
def search_field(object_name, method, options = {})
options = options.stringify_keys
if options["autosave"]
if options["autosave"] == true
options["autosave"] = request.host.split(".").reverse.join(".")
end
options["results"] ||= 10
end
if options["onsearch"]
options["incremental"] = true unless options.has_key?("incremental")
end
InstanceTag.new(object_name, method, self, options.delete("object")).to_input_field_tag("search", options)
end
Defined in actionpack/lib/action_view/helpers/form_helper.rb line 803
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Helpers::FormHelper