add suppliers/lists ui styling and security fixes
This commit is contained in:
@@ -15,7 +15,7 @@ module Suppliers
|
||||
# GET /sections/1
|
||||
# GET /sections/1.json
|
||||
def show
|
||||
@section = Section.find(params[:id])
|
||||
@section = Section.find_by_supplier_and_id(current_supplier, params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
@@ -27,6 +27,7 @@ module Suppliers
|
||||
# GET /sections/new.json
|
||||
def new
|
||||
@section = Section.new
|
||||
@section.supplier = current_supplier
|
||||
|
||||
respond_to do |format|
|
||||
format.html # new.html.erb
|
||||
@@ -36,7 +37,7 @@ module Suppliers
|
||||
|
||||
# GET /sections/1/edit
|
||||
def edit
|
||||
@section = Section.find(params[:id])
|
||||
@section = Section.find_by_supplier_and_id(current_supplier, params[:id])
|
||||
end
|
||||
|
||||
# POST /sections
|
||||
@@ -75,7 +76,7 @@ module Suppliers
|
||||
# DELETE /sections/1
|
||||
# DELETE /sections/1.json
|
||||
def destroy
|
||||
@section = Section.find(params[:id])
|
||||
@section = Section.find_by_supplier_and_id(current_supplier, params[:id])
|
||||
@section.destroy
|
||||
|
||||
respond_to do |format|
|
||||
@@ -87,7 +88,7 @@ module Suppliers
|
||||
# GET /sections/1/manage_tables
|
||||
# GET /sections/1/manage_tables.json
|
||||
def manage_tables
|
||||
@section = Section.find(params[:id])
|
||||
@section = Section.find_by_supplier_and_id(current_supplier, params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
@@ -98,7 +99,7 @@ module Suppliers
|
||||
# GET /sections/1/tables_view
|
||||
# GET /sections/1/tables_view.json
|
||||
def tables_view
|
||||
@section = Section.find(params[:id])
|
||||
@section = Section.find_by_supplier_and_id(current_supplier, params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
|
||||
Reference in New Issue
Block a user