Class: Spree::Api::V2::ChildrenController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/spree/api/v2/children_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



7
8
9
# File 'app/controllers/spree/api/v2/children_controller.rb', line 7

def index
  render_collection children.includes(:products, :taxonomy, :children, :parent)
end

#showObject



11
12
13
# File 'app/controllers/spree/api/v2/children_controller.rb', line 11

def show
  render_instance children.find(params[:id])
end