Modifies the investment orders shown by phase

This commit is contained in:
kikito
2017-01-05 17:38:36 +01:00
parent 7eba0fee50
commit 248755a801
3 changed files with 34 additions and 1 deletions

View File

@@ -17,7 +17,7 @@ module Budgets
feature_flag :budgets
has_orders %w{most_voted newest oldest}, only: :show
has_orders ->(c){ c.instance_variable_get(:@budget).balloting? ? %w{random price} : %w{random confidence_score} }, only: :index
has_orders ->(c) { c.instance_variable_get(:@budget).investments_orders }, only: :index
invisible_captcha only: [:create, :update], honeypot: :subtitle, scope: :budget_investment