15 lines
386 B
Ruby
15 lines
386 B
Ruby
class Suppliers::ExtendedTableSerializer < Qwaiter::Serializer
|
|
root 'table'
|
|
attributes :number, :width, :height, :position_x, :position_y, :section_id#, :active_list_id
|
|
|
|
#def list_id
|
|
#object.active_list_id || object.active_list.try(:id)
|
|
#end
|
|
|
|
#def list
|
|
#object.active_list
|
|
#end
|
|
|
|
#has_one :list, key: :active_list_id, serializer: SupplierExtendedListSerializer
|
|
end
|