app/controllers/avo/relations_controller.rb in avo-1.18.2 vs app/controllers/avo/relations_controller.rb in avo-1.19.0

- old
+ new

@@ -46,12 +46,12 @@ @model.send("#{params[:related_name]}=", @attachment_model) end respond_to do |format| if @model.save - format.html { redirect_to resource_path(@model), notice: t("avo.attachment_class_attached", attachment_class: @attachment_class) } - format.json { render :show, status: :created, location: resource_path(@model) } + format.html { redirect_to resource_path(model: @model, resource: @resource), notice: t("avo.attachment_class_attached", attachment_class: @attachment_class) } + format.json { render :show, status: :created, location: resource_path(model: @model, resource: @resource) } else format.html { render :new } format.json { render json: @model.errors, status: :unprocessable_entity } end end @@ -63,10 +63,10 @@ else @model.send("#{params[:related_name]}=", nil) end respond_to do |format| - format.html { redirect_to params[:referrer] || resource_path(@model), notice: t("avo.attachment_class_detached", attachment_class: @attachment_class) } + format.html { redirect_to params[:referrer] || resource_path(model: @model, resource: @resource), notice: t("avo.attachment_class_detached", attachment_class: @attachment_class) } end end private