Add incompatible scope to Budget Investment model
This commit is contained in:
@@ -51,6 +51,7 @@ class Budget
|
||||
scope :with_supports, -> { where('cached_votes_up > 0') }
|
||||
scope :selected, -> { feasible.where(selected: true) }
|
||||
scope :compatible, -> { where(incompatible: false) }
|
||||
scope :incompatible, -> { where(incompatible: true) }
|
||||
scope :winners, -> { selected.compatible.where(winner: true) }
|
||||
scope :unselected, -> { not_unfeasible.where(selected: false) }
|
||||
scope :last_week, -> { where("created_at >= ?", 7.days.ago)}
|
||||
|
||||
Reference in New Issue
Block a user