Skip to content

Instantly share code, notes, and snippets.

@nfxgosu
Created March 22, 2016 09:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nfxgosu/b86ea3abe760f2d5d25d to your computer and use it in GitHub Desktop.
Save nfxgosu/b86ea3abe760f2d5d25d to your computer and use it in GitHub Desktop.
How do refer to the method autocomplete_person_name? I'm getting a NameError in People#index.html
<script>
$(function() {
$("person_name").autocomplete({
source: "<%= people_autocomplete_person_name_path %>"
});
})
</script>
class PeopleController < ApplicationController
def index
end
def autocomplete_person_name
render json: Person.search(params['term'])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment