cosmetics

This commit is contained in:
2015-05-27 15:28:09 +02:00
parent dcd8c13e57
commit 544049fdc7
8 changed files with 30 additions and 41 deletions
@@ -9,12 +9,16 @@ class UserExtendedListSerializer < Qwaiter::Serializer
# user ids for facebook pictures
self.root = :list
attributes :extended_version, :state, :needs_help, :needs_payment, :user_requests_closing, :is_paid, :price,
:table_id, :table_number, :section_id, :user_ids, :supplier_id, :closed_at
:table_id, :table_number, :section_id, :user_ids, :supplier_id, :closed_at, :cached_supplier_name
#:supplier_orders_in_process_count, :supplier_orders_placed_count
def has_active_orders
object.has_active_orders?
end
def cached_supplier_name
object.supplier.name
end
has_many :orders
#has_many :product_categories
has_one :table, serializer: UserExtendedTableSerializer # this one add a lot of stuff