Upgrades and fixes, maintenance

This commit is contained in:
2014-06-09 19:07:46 +02:00
parent 78a894759b
commit 0e4993e8a6
23 changed files with 87 additions and 57 deletions
@@ -1,7 +1,7 @@
class SupplierExtendedTableSerializer < Qwaiter::Serializer
root 'table'
embed :ids, include: true
attributes :number, :width, :height, :position_x, :position_y, :section_id, :occupied #, :alist_id
attributes :number, :width, :height, :position_x, :position_y, :section_id, :occupied, :active_list_id
#def list_id
#object.active_list_id || object.active_list.try(:id)
@@ -11,9 +11,5 @@ class SupplierExtendedTableSerializer < Qwaiter::Serializer
#object.active_list
#end
def list
object.active_list
end
has_one :list, key: :active_list_id, serializer: SupplierExtendedListSerializer
#has_one :list, key: :active_list_id, serializer: SupplierExtendedListSerializer
end
+1 -1
View File
@@ -6,7 +6,7 @@ class SupplierListSerializer < Qwaiter::Serializer
:table_id, :table_number, :section_id, :user_ids, :supplier_id, :closed_at
has_many :orders
#has_many :product_categories
has_one :table, serializer: SupplierTableSerializer
#has_one :table, serializer: SupplierTableSerializer # tables are part of the sectoins load
has_many :join_requests
has_many :users, serializer: SupplierUserSerializer