I am reading a rails cookbook about the auto_complete_for function, the
code as below
class MusiciansController < ApplicationController
auto_complete_for :musician, :name
# assemble a band...
<% form_tag :action => :add do %>
<%= text_field_with_auto_complete :musician, :name %>
<%= submit_tag 'Add' %>
<% end %>
My question is that, if the name attribute consists lots of duplicated
values, how can I distinct them before pass to auto_complete_for? I
afraid the performance would be affected if not to distinct it.
Thank you very much.