Refactor price & explanation showing logic at Investment model

This commit is contained in:
Bertocq
2018-01-10 01:16:04 +01:00
parent 21d6ce57c5
commit 334091710c

View File

@@ -240,15 +240,11 @@ class Budget
end
def should_show_price?
feasible? &&
selected? &&
(budget.reviewing_ballots? || budget.finished?)
selected? && price.present? && budget.published_prices?
end
def should_show_price_explanation?
feasible? &&
price_explanation.present? &&
(budget.balloting? || budget.reviewing_ballots? || budget.finished?)
should_show_price? && price_explanation.present?
end
def formatted_price