Ember temp commit

This commit is contained in:
2013-09-24 08:47:30 +02:00
parent ebbb5dedfc
commit 5650ada04c
71 changed files with 595 additions and 66 deletions
+8
View File
@@ -1,5 +1,6 @@
class Table
include SimplyStored::Couch
include ActiveModel::SerializerSupport
per_page_method :limit_value #kaminari
property :number, type: Fixnum, default: 1
@@ -41,10 +42,15 @@ class Table
end
end
def serializable_hash
attributes
end
def occupied?
return @is_occupied if instance_variable_defined?(:'@is_occupied')
@is_occupied = !self.class.database.view(List.active_by_table_id_view(key: id, reduce: true)).zero?
end
def occupied=(val) end
def self.enrich_active_list_id(tables)
if tables.is_a?(Array)
@@ -77,9 +83,11 @@ class Table
def width
2.0
end
def width=(val) end
# Method returning the sections table height
def height
2.0
end
def height=(val) end
end