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

Posted by Ajit Teli (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.

Thanks,
  AJit
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.