1
0

Added update action

This commit is contained in:
cryptogopher
2019-11-28 21:00:14 +01:00
parent ffc8dbad8c
commit 557ccd6164
2 changed files with 11 additions and 1 deletions

View File

@@ -39,6 +39,14 @@ class QuantitiesController < ApplicationController
render :index
end
def update
if @quantity.update(quantity_params)
flash[:notice] = 'Updated quantity'
end
prepare_quantities
render :index
end
def destroy
if @quantity.destroy
flash[:notice] = 'Deleted quantity'