Skip to content

Commit 674f33b

Browse files
committed
Standardrb
1 parent 1bfd5ad commit 674f33b

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

app/helpers/comments_helper.rb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ def render_comment_tree(comment)
66
concat content_tag(:tr) {
77
concat content_tag(:td, valign: "top", class: "votelinks") {
88
content_tag(:center) {
9-
concat button_to(upvote_article_comment_path(comment), method: :post, class: "btn btn-sm upvote-button", data: { votable_type: 'Comment', votable_id: comment.id, article_id: comment.article.id }) {
10-
content_tag(:i, '', class: "fas fa-arrow-up")
9+
concat button_to(upvote_article_comment_path(comment), method: :post, class: "btn btn-sm upvote-button", data: {votable_type: "Comment", votable_id: comment.id, article_id: comment.article.id}) {
10+
content_tag(:i, "", class: "fas fa-arrow-up")
1111
}
12-
concat button_to(downvote_article_comment_path(comment), method: :post, class: "btn btn-sm downvote-button", data: { votable_type: 'Comment', votable_id: comment.id, article_id: comment.article.id }) {
13-
content_tag(:i, '', class: "fas fa-arrow-down")
12+
concat button_to(downvote_article_comment_path(comment), method: :post, class: "btn btn-sm downvote-button", data: {votable_type: "Comment", votable_id: comment.id, article_id: comment.article.id}) {
13+
content_tag(:i, "", class: "fas fa-arrow-down")
1414
}
1515
}
1616
}
1717
concat content_tag(:td, comment.text, valign: "top", style: "padding-left: 10px;")
1818
}
1919
concat content_tag(:tr) {
20-
concat content_tag(:td, '', colspan: "2")
20+
concat content_tag(:td, "", colspan: "2")
2121
concat content_tag(:td, class: "subtext") {
2222
safe_concat content_tag(:span, "#{comment.score} points", id: "score-Comment-#{comment.id}", class: "score")
2323
concat raw(" ")
@@ -30,7 +30,7 @@ def render_comment_tree(comment)
3030
safe_concat link_to(" reply", article_comment_path(comment.article, comment))
3131
}
3232
}
33-
concat content_tag(:tr, '', style: "height:5px")
33+
concat content_tag(:tr, "", style: "height:5px")
3434
}
3535
}
3636
if comment.replies.any?
@@ -43,4 +43,3 @@ def render_comment_tree(comment)
4343
end
4444
end
4545
end
46-

db/seeds.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
# Create replies to comments
4646
comments.each_with_index do |comment, i|
4747
replies << Comment.create!(
48-
text: "Sample Reply #{i+1}",
48+
text: "Sample Reply #{i + 1}",
4949
article: comment.article,
5050
user: users.sample,
5151
parent_id: comment.id
@@ -55,7 +55,7 @@
5555
# replies to replies
5656
replies.each_with_index do |reply, i|
5757
Comment.create!(
58-
text: "Sample Reply to Reply #{i+1}",
58+
text: "Sample Reply to Reply #{i + 1}",
5959
article: reply.article,
6060
user: users.sample,
6161
parent_id: reply.id

0 commit comments

Comments
 (0)