Implements decorator methods in investment

This commit is contained in:
kikito
2016-12-02 19:24:01 +01:00
parent c1f62dd317
commit 3508c6d59c

View File

@@ -189,6 +189,16 @@ class Budget
self.responsible_name = author.try(:document_number) if author.try(:document_number).present?
end
def should_show_aside?
(budget.selecting? && !investment.unfeasible?) ||
(budget.balloting? && investment.feasible?) ||
budget.on_hold?
end
def should_show_votes?
budget.selecting? || budget.on_hold?
end
private
def set_denormalized_ids