foodsoft/app/serializers/order_serializer.rb

12 lines
216 B
Ruby

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