palmo25 PRO said about 3 years ago on Autocomplete with StimulusJS :
Hi Dave,
I've followed video tutorial but I don't know why it's not working. It doesn't pick autocomplete.
From the server I get this message
Processing by BooksController#create as HTML
  Parameters: {"authenticity_token"=>"[FILTERED]", "book"=>{"title"=>"I Malavoglia", "publish_year"=>"1881", "author_id"=>""}, "author"=>"Giovanni Verga", "commit"=>"Create Book"}
and in the view I get the error message "Author must exist".
I've created the application and pasted the code of your post. Can't understand where is the mistake.