app/controllers/spree/api/taxonomies_controller.rb in solidus_api-2.10.0.beta1 vs app/controllers/spree/api/taxonomies_controller.rb in solidus_api-2.10.0
- old
+ new
@@ -56,10 +56,12 @@
ransack(params[:q]).
result
end
def taxonomy
- @taxonomy ||= Spree::Taxonomy.accessible_by(current_ability, :read).find(params[:id])
+ @taxonomy ||= Spree::Taxonomy.accessible_by(current_ability, :read).
+ includes(root: :children).
+ find(params[:id])
end
def taxonomy_params
if params[:taxonomy] && !params[:taxonomy].empty?
params.require(:taxonomy).permit(permitted_taxonomy_attributes)