Move assigned_valuators from helper to model
There's no good reason to call assigned_valuators(investment) when the logic can be at the model. Also removed the valuator_groups texts to be added in an independent method
This commit is contained in:
@@ -320,6 +320,14 @@ class Budget
|
||||
investments
|
||||
end
|
||||
|
||||
def assigned_valuators
|
||||
self.valuators.collect(&:description_or_name).compact.join(', ').presence
|
||||
end
|
||||
|
||||
def assigned_valuation_groups
|
||||
self.valuator_groups.collect(&:name).compact.join(', ').presence
|
||||
end
|
||||
|
||||
def self.to_csv(investments, options = {})
|
||||
attrs = [I18n.t("admin.budget_investments.index.table_id"),
|
||||
I18n.t("admin.budget_investments.index.table_title"),
|
||||
|
||||
Reference in New Issue
Block a user