From b6e47bc14a4e5c732de34f2e0fe79985c80ce395 Mon Sep 17 00:00:00 2001 From: kikito Date: Fri, 27 May 2016 15:12:39 +0200 Subject: [PATCH] Adds missing scope to investments --- app/models/budget/investment.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/budget/investment.rb b/app/models/budget/investment.rb index 32ea9ad92..329c2fce2 100644 --- a/app/models/budget/investment.rb +++ b/app/models/budget/investment.rb @@ -42,6 +42,7 @@ class Budget scope :undecided, -> { where(feasibility: "undecided") } scope :with_supports, -> { where('cached_votes_up > 0') } + scope :by_heading, -> (heading_id) { where(heading_id: heading_id) } scope :by_budget, -> (budget_id) { where(budget_id: budget_id) } scope :by_admin, -> (admin_id) { where(administrator_id: admin_id) } scope :by_tag, -> (tag_name) { tagged_with(tag_name) }