10 lines
217 B
Ruby
10 lines
217 B
Ruby
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
|