diff --git a/app/assets/javascripts/darkswarm/services/product.js.coffee b/app/assets/javascripts/darkswarm/services/product.js.coffee index 2c57512bff..e33a037a61 100644 --- a/app/assets/javascripts/darkswarm/services/product.js.coffee +++ b/app/assets/javascripts/darkswarm/services/product.js.coffee @@ -1,4 +1,4 @@ -Darkswarm.factory 'Product', ($resource, Enterprises) -> +Darkswarm.factory 'Product', ($resource, Enterprises, Dereferencer, Taxons) -> new class Product constructor: -> @update() @@ -18,3 +18,5 @@ Darkswarm.factory 'Product', ($resource, Enterprises) -> dereference: -> for product in @products product.supplier = Enterprises.enterprises_by_id[product.supplier.id] + Dereferencer.dereference product.taxons, Taxons.taxons_by_id + diff --git a/app/views/shop/products.rabl b/app/views/shop/products.rabl index dca5ea1673..a337ec3b16 100644 --- a/app/views/shop/products.rabl +++ b/app/views/shop/products.rabl @@ -43,7 +43,7 @@ node :variants do |product| end child :taxons => :taxons do |taxon| - attributes :name, :id + attributes :id end child :properties => :properties do |property|