Only update slug if empty or model condition is met
This commit is contained in:
@@ -28,5 +28,11 @@ class Budget
|
||||
investments.empty?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def generate_slug?
|
||||
slug.nil? || budget.drafting?
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user