changes unselected scope to include undecided feasibility

This commit is contained in:
Juanjo Bazán
2017-05-17 15:13:29 +02:00
parent 4787ee5716
commit d08af6193e
3 changed files with 45 additions and 1 deletions

View File

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