API v1 orders endpoints
This commit is contained in:
parent
7d5155bef6
commit
127ae83f04
9 changed files with 165 additions and 10 deletions
11
app/serializers/order_serializer.rb
Normal file
11
app/serializers/order_serializer.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue