inventory development

This commit is contained in:
Nweni
2017-08-28 09:37:36 +06:30
parent 6aaea69f0a
commit 83ec17a3df
16 changed files with 200 additions and 46 deletions

View File

@@ -28,7 +28,7 @@ class Inventory::InventoryDefinitionsController < BaseInventoryController
respond_to do |format|
if @inventory_definition.save
format.html { redirect_to @inventory_definition, notice: 'Inventory definition was successfully created.' }
format.html { redirect_to inventory_path, notice: 'Inventory definition was successfully created.' }
format.json { render :show, status: :created, location: @inventory_definition }
else
format.html { render :new }
@@ -69,6 +69,6 @@ class Inventory::InventoryDefinitionsController < BaseInventoryController
# Never trust parameters from the scary internet, only allow the white list through.
def inventory_definition_params
params.fetch(:inventory_definition, {})
params.require(:inventory_definition).permit(:item_code, :min_order_level, :max_stock_level)
end
end