initial commit

This commit is contained in:
2012-08-22 18:15:37 +02:00
commit 0856528f5e
120 changed files with 3048 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
class List
include SimplyStored::Couch
property :state
property :closed_at, type: Time
has_many :orders
belongs_to :table
has_and_belongs_to_many :users, storing_keys: true
validates :table_id, presence: true
def close!
self.state = 'closed'
self.closed_at = Time.now
save
end
def supplier
table.supplier
end
end