Open
Description
@@ -93,11 +93,11 @@ module AutoCompleteMacrosHelper
#
# The auto_complete_result can of course also be called from a view belonging to the
# auto_complete action if you need to decorate it further.
def auto_complete_result(entries, field, phrase = nil)
return unless entries
- items = entries.map { |entry| content_tag("li", phrase ? highlight(entry[field], phrase) : h(entry[field])) }
+ items = entries.map { |entry| content_tag("li", phrase ? highlight(entry.send(field), phrase) : h(entry.send(field))) }
content_tag("ul", items.uniq)
end
Wrapper for text_field with added AJAX autocompletion functionality.
Metadata
Metadata
Assignees
Labels
No labels