<%- state_options = options_for_select(options_for_available_states, params[:state_id]) city_options = options_for_select(options_for_available_cities(params[:state_id]), params[:city_id]) -%>

<%= t('.title') %>

<%= form_tag(jobs_path, method: :get) do %> <%= select_tag :state_id, state_options, prompt: t('.select_state'), include_blank: true, data: { 'filter-select' => '{"target": "#city_id", "filterParam":"state_id", "filter": "city", "data": { "open_jobs": "1"} }' } %> <%= select_tag :city_id, city_options, prompt: t('.select_city') %> <% end %>