def json_for_autocomplete(items, method, extra_data=[])
      items = items.collect do |item|
        hash = HashWithIndifferentAccess.new({"id" => item.id.to_s, "label" => item.send(method), "value" => item.send(method)})
        extra_data.each do |datum|
          hash[datum] = item.send(datum)
        end if extra_data
        # TODO: Come back to remove this if clause when test suite is better
        hash
      end
      if block_given?
        yield(items)
      else
        items
      end
    end
def json_for_autocomplete(items, method, extra_data=[])
      items = items.collect do |item|
        hash = HashWithIndifferentAccess.new({"id" => item.id.to_s, "label" => item.send(method), "value" => item.send(method)})
        extra_data.each do |datum|
          hash[datum] = item.send(datum)
        end if extra_data
        # TODO: Come back to remove this if clause when test suite is better
        hash
      end
      if block_given?
        yield(items)
      else
        items
      end
    end
Returns a hash with three keys actually used by the Autocomplete jQuery-ui
 Can be overriden to show whatever you like
 Hash also includes a key/value pair for each method in extra_data