summaryrefslogtreecommitdiff
path: root/app/models/message.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/message.rb')
-rw-r--r--app/models/message.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/message.rb b/app/models/message.rb
index 424f094..2478f3f 100644
--- a/app/models/message.rb
+++ b/app/models/message.rb
@@ -26,4 +26,8 @@ class Message < CouchRest::Model::Base
def unread_by?(user)
user_ids_to_show.include?(user.id)
end
+
+ def as_json(*args, &block)
+ {"id" => id, "text" => text}.as_json(*args, &block)
+ end
end