Commit 3db4d952 by Rocky Duan

include both

parent e37b3296
......@@ -47,7 +47,7 @@ class Comment < Content
if params[:recursive]
self.class.hash_tree(subtree(sort: sort_by_parent_and_time)).first
else
as_document.slice(*%w[body course_id endorsed _id updated_at]).
as_document.slice(*%w[body course_id endorsed _id created_at updated_at]).
merge("user_id" => author.id).
merge("votes" => votes.slice(*%w[count up_count down_count point]))
end
......
......@@ -37,7 +37,7 @@ class CommentThread < Content
end
def to_hash(params={})
doc = as_document.slice(*%w[title body course_id _id updated_at]).
doc = as_document.slice(*%w[title body course_id _id created_at updated_at]).
merge("user_id" => (author.id if author)).
merge("votes" => votes.slice(*%w[count up_count down_count point]))
if params[:recursive]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment