Forum: Ruby on Rails Auto complete for 2 tables

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0348be81e22f24afdaa6e4f137aa9dfc?d=identicon&s=25 Priya Buvan (priyadharsini)
on 2009-02-20 05:54
Hi all,
      I'm using autocomplete in my application. I'm able to take values
from single table for auto complete. Now i need to take values from two
tables using many-to-many relationship.

Actually i have to tables items and orders table. Many-to-many
relationship between these two. I have another one table items_orders,
which have item_id and order_id in it. I need to show auto complete in
the following format

      "GH > Petrochemicals", where GH is in items table and
Petrochemicals is in orders table. Please give me some solution or
suggestion for this. It'll be very helpful. Thanks to all in advance.
This topic is locked and can not be replied to.