diff --git a/app/models/budget.rb b/app/models/budget.rb index ea22a4615..d642e7d0c 100644 --- a/app/models/budget.rb +++ b/app/models/budget.rb @@ -10,6 +10,9 @@ class Budget < ActiveRecord::Base has_many :headings, through: :groups has_many :investments, through: :headings + scope :open, -> { where.not(phase: "finished") } + scope :finished, -> { where(phase: "finished") } + def on_hold? phase == "on_hold" end