Merge pull request #1670 from consul/feature/1601#generate_budget_heading_winners

Add Budget Investments filter by winners
This commit is contained in:
Raimond Garcia
2017-06-21 17:53:01 +02:00
committed by GitHub
9 changed files with 29 additions and 3 deletions

View File

@@ -49,6 +49,7 @@ class Budget
scope :undecided, -> { where(feasibility: "undecided") }
scope :with_supports, -> { where('cached_votes_up > 0') }
scope :selected, -> { feasible.where(selected: true) }
scope :winners, -> { selected.where(winner: true) }
scope :unselected, -> { not_unfeasible.where(selected: false) }
scope :last_week, -> { where("created_at >= ?", 7.days.ago)}