get '/section' do
  Section.eager_load(:categories).order('sections.order, categories.order').to_json(:include => :categories)
end

get '/section/:id' do
    Section.eager_load(categories: :sub_categories).order('categories.order, sub_categories.order').find(params[:id].to_i).to_json(:include => [:categories => {:include => :sub_categories}])
end
