foodsoft/app/serializers/group_order_article_serializer.rb

9 lines
211 B
Ruby
Raw Permalink Normal View History

2018-10-13 16:27:24 +02:00
class GroupOrderArticleSerializer < ActiveModel::Serializer
attributes :id, :order_article_id
attributes :quantity, :tolerance, :result, :total_price
def total_price
object.total_price.to_f
end
end