Boards
<%= select_tag(
:boards,
options_for_select(@boards.map { |board| [board.name, board.id] }),
include_blank: '-- select pipeline --'
) %>
Pipelines
<%= select_tag(
:pipelines,
options_for_select(@pipelines.map { |pipeline| [pipeline.label, pipeline.id] }),
include_blank: '-- select board --'
) %>
<%= form_with(url: '/mappings', method: :post, class: 'row mapping-select') do %>
<%= select_tag('mapping[board_list_id]', nil, include_blank: '-- select trello list --', class: 'column') %>
<%= select_tag('mapping[pipeline_stage_id]', nil, include_blank: '-- select pipeline stage --', class: 'column') %>
<%= hidden_field(:mapping, :board_id, value: nil)%>
<%= hidden_field(:mapping, :pipeline_id, value: nil)%>
<%= submit_tag('Add row', class: 'column') %>
<% end %>
<%= render 'mapping', object: @mapping, object: {}, classes: 'template' %>
<% end %>