NagaLakshmi
NagaLakshmi

Reputation: 705

Creating dynamic drop-down list boxes in Rails but data not from the database

I want to create 2 dynamic drop-down list boxes but the data for both of the text boxes are from API response not from the local database.When I select the data in first drop-down,a REST call has to be made depends on the data selected and the response has to be shown in the second drop down. Is there any way to do this?


I'm searching for this a long time but I'm able to do like this only using the data from local database.

Upvotes: 0

Views: 109

Answers (1)

MatthewFord
MatthewFord

Reputation: 2926

I would take a look at select2, which does an ajax call to a controller action, which then calls the APIs in question.

Upvotes: 1

Related Questions