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:
@@ -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}") %>
|
||||
|
||||
Reference in New Issue
Block a user