foodsoft/app/serializers/order_serializer.rb

12 lines
216 B
Ruby
Raw Permalink Normal View History

2018-10-13 16:16:44 +02:00
class OrderSerializer < ActiveModel::Serializer
attributes :id, :name, :starts, :ends, :boxfill, :pickup, :is_open, :is_boxfill
def is_open
object.open?
end
def is_boxfill
object.boxfill?
end
end