summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjomo <github@jomo.tv>2015-04-02 10:30:15 +0200
committerjomo <github@jomo.tv>2015-04-02 10:30:15 +0200
commit40bdcaf16b33a28e1287f1e8301529d1c2a4a5e6 (patch)
treec1203273b3180f7d359fa3a3eb4beb4da357b4e2
parent11efebc31663c88cf45c0aaa29c975f37a540505 (diff)
Revert "blog comment improvements"
This reverts commit 320cfa56f9e051d8539e50400c3b427f54e0dd10.
-rw-r--r--app/controllers/blogposts_controller.rb12
-rw-r--r--app/views/blogposts/show.html.erb2
2 files changed, 1 insertions, 13 deletions
diff --git a/app/controllers/blogposts_controller.rb b/app/controllers/blogposts_controller.rb
index e1fae78..79c9e5d 100644
--- a/app/controllers/blogposts_controller.rb
+++ b/app/controllers/blogposts_controller.rb
@@ -10,18 +10,6 @@ class BlogpostsController < ApplicationController
def show
@comment = Comment.new(blogpost: @post)
@comments = @post.comments.page(params[:page])
- @comments = @comments.select do |c|
- # shadowban april fool comments
- if c.author.is?(current_user) || !["april", "hoax", "fool", "troll", "joke", "prank", "legit"].any? { |word| c.content.downcase.include? word }
- true
- elsif current_user && current_user.mod?
- c.content = "[HIDDEN] " + c.content
- true
- else
- false
- end
- end
- @comments = Kaminari.paginate_array(@comments).page(params[:page]).per(25)
end
def new
diff --git a/app/views/blogposts/show.html.erb b/app/views/blogposts/show.html.erb
index dc60e66..71a4b07 100644
--- a/app/views/blogposts/show.html.erb
+++ b/app/views/blogposts/show.html.erb
@@ -20,7 +20,7 @@
</div>
</div>
<div id="comments">
- <h3><%= "#{pluralize(@comments.size, 'comment')}." %></h3>
+ <h3><%= "#{pluralize(@post.comments.size, 'comment')}." %></h3>
<% @comments.each do |c| %>
<%= render "comments/comment", c: c %>
<% end %>