This commit is contained in:
Peter Bhat Harkins 2018-11-24 16:02:45 -06:00
parent b23f106477
commit 04753278b3
2 changed files with 4 additions and 1 deletions

View File

@ -115,6 +115,7 @@ var _Lobsters = Class.extend({
d.append(a);
});
console.log(voterEl, d);
if (thingType == "story") {
$(voterEl).after(d);
d.position({

View File

@ -71,7 +71,9 @@ class Comment < ApplicationRecord
end
def self.arrange_for_user(user)
parents = self.order(Arel.sql("(comments.upvotes - comments.downvotes) < 0 ASC, comments.confidence DESC"))
parents = self.order(
Arel.sql("(comments.upvotes - comments.downvotes) < 0 ASC, comments.confidence DESC")
)
.group_by(&:parent_comment_id)
# top-down list of comments, regardless of indent level