Starts fixing management budget investments

This commit is contained in:
kikito
2016-12-01 16:31:05 +01:00
parent 424d0201c4
commit 00cfb95913
8 changed files with 97 additions and 37 deletions

View File

@@ -4,8 +4,12 @@ module BudgetHeadingsHelper
budget.headings.map {|heading| [heading.name, heading.id]}
end
def multiple_budgets_heading_select_options(headings)
headings.map { |heading| ["#{heading.budget.name} - #{heading.group.name} - #{heading.name}", heading.id] }
end
def budget_scoped_heading_select_options(budget)
budget.headings.includes(:group).order("group_id ASC, budget_headings.name ASC").map {|heading| [heading.group.name + ': ' + heading.name, heading.id]}
end
end
end