app/controllers/sprangular/taxonomies_controller.rb in sprangular-0.0.1 vs app/controllers/sprangular/taxonomies_controller.rb in sprangular-0.1.0
- old
+ new
@@ -1,5 +1,8 @@
class Sprangular::TaxonomiesController < Sprangular::BaseController
def index
@taxonomies = Spree::Taxonomy.order('name').includes(root: :children)
+
+ render json: @taxonomies,
+ each_serializer: Sprangular::TaxonomySerializer
end
end