Hide group name only on budgets with one group
In the form of creating a new investment was hiding the name of the group if it had only one heading, but could be confusing to users if there are, for example, five different groups of one heading. The solution: - If the budget has one group and one heading, the heading selector is hidden. - If the budget has one group and more than one heading, the group name is hidden. - If the budget has more than one group, the group name appears regardless of the number of headings.
This commit is contained in:
@@ -30,10 +30,6 @@ class Budget
|
||||
all.sort_by(&:name)
|
||||
end
|
||||
|
||||
def single_heading_group?
|
||||
headings.count == 1
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def generate_slug?
|
||||
|
||||
Reference in New Issue
Block a user