From fd556fe0facd9f4dc2d4b0583a83ec2188b634f1 Mon Sep 17 00:00:00 2001 From: "BOYA,CHIU" Date: Wed, 4 Aug 2021 13:11:46 +0800 Subject: [PATCH] fix error --- app/views/admin/ruling_buses/_bus_form.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/admin/ruling_buses/_bus_form.html.erb b/app/views/admin/ruling_buses/_bus_form.html.erb index fbcb35e..dd3f646 100644 --- a/app/views/admin/ruling_buses/_bus_form.html.erb +++ b/app/views/admin/ruling_buses/_bus_form.html.erb @@ -23,7 +23,7 @@
- <%= f.select :city,RulingBusesHelper.get_available_cities %> + <%= f.select :city,[""]+RulingBusesHelper.get_available_cities %>
<% stops = f.object.city.blank? ? [] : RulingBusesHelper.get_stops_for_city(f.object.city,f.object.location_code,f.object.locale) %> @@ -93,7 +93,7 @@ id: id }); }) - $("#ruling_bus_info_monitor_point,#ruling_bus_info_destination").empty().select2({ + $("#ruling_bus_info_monitor_point,#ruling_bus_info_destination").select2('destroy').empty().select2({ data: options }); $("#ruling_bus_info_monitor_point,#ruling_bus_info_destination").removeAttr('disabled');