Autocompletion for resources partially working with Rails