Base progress
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
module Suppliers
|
||||
class SuppliersController < Suppliers::ApplicationController
|
||||
def index
|
||||
render json: {}
|
||||
|
||||
end
|
||||
|
||||
@@ -15,7 +16,7 @@ module Suppliers
|
||||
#product_categories.products
|
||||
#product_categories.products.product_variants
|
||||
#]) #.new(current_supplier).as_json
|
||||
render json: JSONAPI::Serializer.serialize(current_supplier, serializer: Suppliers::SupplierSerializer, include: %w[
|
||||
render json: current_supplier, include: %w[
|
||||
sections
|
||||
sections.tables
|
||||
sections.section_areas
|
||||
@@ -23,13 +24,13 @@ module Suppliers
|
||||
product_categories
|
||||
product_categories.products
|
||||
product_categories.products.product_variants
|
||||
])
|
||||
]
|
||||
end
|
||||
|
||||
def update
|
||||
@supplier = current_supplier
|
||||
current_supplier.update_attributes(supplier_params)
|
||||
render json: JSONAPI::Serializer.serialize( current_supplier, serializer: Suppliers::SupplierSerializer)
|
||||
render json: current_supplier
|
||||
end
|
||||
|
||||
def switch_to
|
||||
|
||||
Reference in New Issue
Block a user