Sha256: 6adca382e3482d5a1e0c168db0d0f7ea12db3f94996e27d3da6369f1cd61deb0

Contents?: true

Size: 558 Bytes

Versions: 5

Compression:

Stored size: 558 Bytes

Contents

module Comee
  module Core
    class ProductsController < ApplicationController
      include Common

      def index
        super do
          products = Product.leafs
          products.then(&paginate)
        end
      end

      def show
        super do
          product = Comee::Core::Product.with_attached_images.find(params[:id])
          product
        end
      end

      private

      def model_params
        params.required(:payload).permit(:code, :name, :description, :parent_id, :thumbnail_image, images: [])
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
comee_core-0.1.45 app/controllers/comee/core/products_controller.rb
comee_core-0.1.45.pre3 app/controllers/comee/core/products_controller.rb
comee_core-0.1.45.pre2 app/controllers/comee/core/products_controller.rb
comee_core-0.1.45.pre app/controllers/comee/core/products_controller.rb
comee_core-0.1.44 app/controllers/comee/core/products_controller.rb