supplier client sections working with problematic authentication still active

This commit is contained in:
2020-02-27 15:44:43 -05:00
parent 9e86b18c3e
commit 2149345d3d
33 changed files with 456 additions and 281 deletions
@@ -12,7 +12,7 @@ module Suppliers
# GET /tables/1
# GET /tables/1.json
def show
@table= Table.find_by_supplier_id_and_id!(current_supplier.id, params[:id])
@table = Table.find_by_supplier_id_and_id!(current_supplier.id, params[:id])
render json: @table
end
@@ -20,7 +20,7 @@ module Suppliers
# GET /tables/new
# GET /tables/new.json
def new
@table = Table.new
@table = Table.new supplier: current_supplier
@table.section_id = params[:section_id].presence
render json: @table
@@ -47,7 +47,7 @@ module Suppliers
# PUT /supplier/tables/1
# PUT /supplier/tables/1.json
def update
@table= Table.find_by_supplier_id_and_id!(current_supplier.id, params[:id])
@table = Table.find_by_supplier_id_and_id!(current_supplier.id, params[:id])
if @table.update_attributes(table_params)
render json: @table