Sha256: 35023e1ad8eaa3499d32592ff17409a7ae44b407d896c78102b5130f424c965e
Contents?: true
Size: 645 Bytes
Versions: 8
Compression:
Stored size: 645 Bytes
Contents
module Spree module Api module V2 class ChildrenController < Spree::Api::V2::BaseController skip_before_action :authenticate_user, only: [:index, :show] def index render_collection children.includes(:products, :taxonomy, :children, :parent) end def show render_instance children.find(params[:id]) end private def children if params[:taxon_id] Spree::Taxon.find(params[:taxon_id]) end.children end def filter_attributes Spree::TaxonSerializer._attributes end end end end end
Version data entries
8 entries across 8 versions & 3 rubygems