text_field_with_auto_complete inside form_for

后端 未结 5 1766
既然无缘
既然无缘 2021-02-10 09:25

Simple question really - how do I use text_field_with_auto_complete inside a form_for block?

I\'ve tried doing f.text_field_with_auto_com

5条回答
  •  北荒
    北荒 (楼主)
    2021-02-10 09:55

    Even within the form_for block you ned to specify the full model because it is used to construct the Ajax callback. Also in the empty hash Ricardo listed you could pass additional options to the autocomplete field including ":token" etc.

提交回复
热议问题