diff --git a/app/models/budget.rb b/app/models/budget.rb index 7fa03db9a..6111df301 100644 --- a/app/models/budget.rb +++ b/app/models/budget.rb @@ -6,6 +6,7 @@ class Budget < ActiveRecord::Base PHASES = %w(drafting accepting reviewing selecting valuating publishing_prices balloting reviewing_ballots finished).freeze ON_HOLD_PHASES = %w(reviewing valuating publishing_prices reviewing_ballots).freeze + PUBLISHED_PRICES_PHASES = %w(publishing_prices balloting reviewing_ballots finished).freeze CURRENCY_SYMBOLS = %w(€ $ £ ¥).freeze @@ -82,6 +83,10 @@ class Budget < ActiveRecord::Base phase == "finished" end + def published_prices? + PUBLISHED_PRICES_PHASES.include?(phase) + end + def balloting_process? balloting? || reviewing_ballots? end