supplier client sections working with problematic authentication still active
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user