How to exclude the item selected in the first list from the second list?
<%= f.select(:city_2, @city_select) %> <%= f.select(:city_1, @city_select) %> How to exclude the item selected in the first list from the second list?
<%= f.select(:city_2, @city_select) %> <%= f.select(:city_1, @city_select) %> RoR is a backend, it knows nothing about what is happening in your front end until you send this data to it. Ajax not needed here, you need Javascript .
Source: https://ru.stackoverflow.com/questions/515103/
All Articles