Forum: Ruby on Rails How to get data from database table 'drivers' with the help of this.options[this.selectedIndex] ?

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.
036cf7f3820364b21f8710bfc71f5778?d=identicon&s=25 Ajit T. (ajitteli)
on 2012-07-30 11:47
Hi all,

   I have a table named 'drivers' in database. And in UI, for select_tag
onchange, when I change the driver from dropdown menu I will get the
changed driver with the help of this.options[this.selectedIndex].

Now how can I fetch the data related to selected driver from database?

For example, there are 5 drivers (d1, d2, d3, d3, and d5). When I change
from d1 to d2, I need to confirm that d2 driver is free now by getting
the data from drivers table.

This topic is locked and can not be replied to.