Sha256: 905720e00bd4de3b23d3866cc5951631b48b164f2bcd2ac5d5175e0bdef097b5
Contents?: true
Size: 638 Bytes
Versions: 4
Compression:
Stored size: 638 Bytes
Contents
module Workarea module Api module Storefront class CategoriesController < Api::Storefront::ApplicationController before_action :cache_page def index models = Catalog::Category.active.page(params[:page]) @categories = Workarea::Storefront::CategoryViewModel.wrap( models, view_model_options ) end def show model = Catalog::Category.find_by(slug: params[:id]) @category = Workarea::Storefront::CategoryViewModel.wrap( model, view_model_options ) end end end end end
Version data entries
4 entries across 4 versions & 2 rubygems