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.
This commit is contained in:
kikito
2016-12-24 14:42:46 +01:00
parent 767c537883
commit 03ef20bfde
6 changed files with 13 additions and 33 deletions

View File

@@ -4,7 +4,7 @@
data-order="<%= @current_order %>"
name="order-selector"
id="order-selector-participation">
<% valid_orders.each do |order| %>
<% @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}") %>