foodsoft/app/serializers/order_article_serializer.rb

11 lines
217 B
Ruby
Raw Normal View History

2018-10-13 16:21:37 +02:00
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