module Users class SuppliersController < Users::ApplicationController def show @supplier = Supplier.find(params[:id]) render json: {}, status: :not_found and return unless @supplier.present? render json: @supplier, include: %w[ product_categories product_categories.products product_categories.products.product_variants ] end end end