API v1 order_articles endpoints

This commit is contained in:
wvengen 2018-10-13 16:21:37 +02:00 committed by wvengen
parent 127ae83f04
commit ed9192c47f
14 changed files with 323 additions and 4 deletions

View file

@ -0,0 +1,10 @@
class OrderArticleSerializer < ActiveModel::Serializer
attributes :id, :order_id, :price
attributes :quantity, :tolerance, :units_to_order
has_one :article
def price
object.price.fc_price.to_f
end
end