working ember... again

This commit is contained in:
2013-10-07 23:00:01 +02:00
parent a8c01d264e
commit 2f41560591
46 changed files with 274 additions and 114 deletions
+16 -1
View File
@@ -1,7 +1,22 @@
class TableSerializer < Qwaiter::Serializer
attributes(*%i[number width height position_x position_y section_id occupied active_list_id])
embed :ids, include: true
attributes :number, :width, :height, :position_x, :position_y, :section_id, :occupied #, :alist_id
#def list_id
#object.active_list_id || object.active_list.try(:id)
#end
#def list
#object.active_list
#end
def occupied
object.active_list_id.present?
end
def list
object.active_list
end
has_one :list, key: :active_list_id
end