summaryrefslogtreecommitdiff
path: root/users/app/models/message.rb
diff options
context:
space:
mode:
authorazul <azul@riseup.net>2014-02-10 12:44:08 +0100
committerazul <azul@riseup.net>2014-02-10 12:44:08 +0100
commitbcdde2f6bfb4ed3a1535bd2e50ab47529a9141e2 (patch)
tree6748d5170cb2a3ed387f2bf8f26bacbbc46df7d1 /users/app/models/message.rb
parent38474e94e3bfaeb40fb87bf2a9b8b1fbe546bc05 (diff)
parent7e0573f3347dca6323eae05127849431ecbceb77 (diff)
Merge pull request #134 from jessib/feature/messages_api
Feature/messages api
Diffstat (limited to 'users/app/models/message.rb')
-rw-r--r--users/app/models/message.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/users/app/models/message.rb b/users/app/models/message.rb
new file mode 100644
index 0000000..d9ccee8
--- /dev/null
+++ b/users/app/models/message.rb
@@ -0,0 +1,16 @@
+class Message < CouchRest::Model::Base
+
+ use_database :messages
+
+ property :text, String
+ property :user_ids_to_show, [String]
+ property :user_ids_have_shown, [String] # is this necessary to store?
+
+ timestamps!
+
+ design do
+ own_path = Pathname.new(File.dirname(__FILE__))
+ load_views(own_path.join('..', 'designs', 'message'))
+ end
+
+end