Remove excerpt stuff, only show quote once clicked

This commit is contained in:
David Taylor
2017-03-08 00:43:22 +00:00
parent f38c7a3991
commit 4aaeee8aec
2 changed files with 10 additions and 17 deletions
+4 -6
View File
@@ -224,19 +224,17 @@ SQL
{
post_number: info[0],
username: info[1],
excerpt: info[2]
}
end
end
def accepted_answer_post_info
# TODO: we may already have it in the stream ... so bypass query here
post = Post.where(id: accepted_answer_post_id, topic_id: object.topic.id).joins(:user).first
excerpt = post.excerpt
return [post.post_number, post.username, post.excerpt(100)]
Post.where(id: accepted_answer_post_id, topic_id: object.topic.id)
.joins(:user)
.pluck('post_number, username')
.first
end
def accepted_answer_post_id