Is there a way to pass in a parameter (e.g. an ID) to the
auto_complete_for… method? I have a table of answers that I’m
serving up for auto-completion, but I only want the answers that apply
to a given field. In my answers table, each entry has an list ID, and
I would like to be able to to just get the answers that match the ID
for a particular list.
I’ve overridden the auto_complete_for… for method to specify my
own :conditions parameter, but so far I’m hard-coding the answer list
ID. What I’d really like to do is, perhaps in the rhtml, specify an
ID parameter that then somehow the auto_complete_for… would be able
to access. Is there a way to do that?