Forum: Ruby on Rails Auto complete for 2 tables

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Priya B. (Guest)
on 2009-02-20 06: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.