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

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.

Thanks,
AJit

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs