Files
grecia/app/views/shared/_order_selector.html.erb
kikito 03ef20bfde Merges orders_helper functionality inside has_orders concern
Both these objects where using/setting a variable called valid_orders.
As a results, some specs where becoming flacky
(features/budgets/investments_spec.rb, balloting phase). By putting
them together, there is no `valid_orders` variable any more (everything
is @valid_orders) and the flackyness is gone.
2016-12-24 14:42:46 +01:00

15 lines
619 B
Plaintext

<form class="inline-block">
<label for="order-selector-participation" class="sr-only"><%= t("#{i18n_namespace}.select_order") %></label>
<select class="js-location-changer js-order-selector select-order"
data-order="<%= @current_order %>"
name="order-selector"
id="order-selector-participation">
<% @valid_orders.each do |order| %>
<option <%= 'selected' if order == @current_order %>
value='<%= current_path_with_query_params(order: order, page: 1) %>'>
<%= t("#{i18n_namespace}.orders.#{order}") %>
</option>
<% end %>
</select>
</form>