Hide max votable field on single heading budgets

IMHO selecting in how many headings it's possible to support investments
isn't necessary when there's only one option to choose from. It's
obvious that if there's only one heading, it will be impossible to
select investments from more than one heading.
This commit is contained in:
Javi Martín
2021-08-23 22:30:45 +02:00
parent 19e5b67712
commit c8827f5c7f
3 changed files with 17 additions and 4 deletions

View File

@@ -30,6 +30,10 @@ class Budget
all.sort_by(&:name)
end
def multiple_headings?
headings.size > 1
end
private
def generate_slug?