Add image to product

This commit is contained in:
2014-08-27 17:14:56 +02:00
parent 22ebf9e376
commit 2ed16351da
15 changed files with 55 additions and 23 deletions
+9 -1
View File
@@ -1,4 +1,12 @@
class ProductSerializer < Qwaiter::Serializer
embed :ids, include: true
attributes :name, :price, :description
attributes :name, :price, :description, :image
def image
if object.image.present?
{small: object.image.url(:small)}
else
nil
end
end
end