Merge pull request #2434 from consul/slug_generation_logic

Only change budget slugs if its on draft phase
This commit is contained in:
BertoCQ
2018-02-05 15:35:58 +01:00
committed by GitHub
9 changed files with 48 additions and 10 deletions

View File

@@ -13,5 +13,11 @@ class Budget
def single_heading_group?
headings.count == 1
end
private
def generate_slug?
slug.nil? || budget.drafting?
end
end
end

View File

@@ -28,5 +28,11 @@ class Budget
investments.empty?
end
private
def generate_slug?
slug.nil? || budget.drafting?
end
end
end