I am writing a web application that will let my friends play a pick em game with boxing and MMA fights. I am trying to use Rails4-Autocomplete to pull in the name of fighters from a fighters table. My fights table has two fighters and I want to save the fighter ID returned to two fields called fighter1_id and fighter2_id. The auto complete is working fine, but when I save it is not updating the fighter1_id
I think I am following the documentation properly, anyone know what I am doing wrong??
<%= f.label :fighter1 %>
<%= f.autocomplete_field :fighter1, autocomplete_fighter_name_fights_path, :id => :fighter1_id %>
Aucun commentaire:
Enregistrer un commentaire