ancestors() sets depth for self, instead of returning new instance

This commit is contained in:
2025-01-12 18:09:34 +01:00
parent d5e7ccacf5
commit 421515e5ce
3 changed files with 10 additions and 4 deletions

View File

@@ -31,7 +31,7 @@ class QuantitiesController < ApplicationController
def update
if @quantity.update(quantity_params.except(:parent_id))
@ancestors = @quantity.ancestors(include_self: true)
@ancestors = @quantity.ancestors
flash.now[:notice] = t('.success', quantity: @quantity)
else
render :edit