Skip to content

Commit

Permalink
Refactor price & explanation showing logic at Investment model
Browse files Browse the repository at this point in the history
  • Loading branch information
bertocq committed Jan 10, 2018
1 parent 21d6ce5 commit 3340917
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions app/models/budget/investment.rb
Expand Up @@ -240,15 +240,11 @@ def should_show_ballots?
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
Expand Down

0 comments on commit 3340917

Please sign in to comment.