Adds message to selected budget investments

This commit is contained in:
decabeza
2018-05-09 13:05:11 +02:00
parent f18f575def
commit f1e722ac5c
3 changed files with 82 additions and 1 deletions

View File

@@ -66,6 +66,12 @@ module BudgetsHelper
def current_budget_map_locations
return unless current_budget.present?
MapLocation.where(investment_id: current_budget.investments).map { |l| l.json_data }
if current_budget.valuating_or_later?
investments = current_budget.investments.selected
else
investments = current_budget.investments
end
MapLocation.where(investment_id: investments).map { |l| l.json_data }
end
end