make moderated cookie permanent

This commit is contained in:
r888888888
2016-09-12 13:06:09 -07:00
parent 70fef49e81
commit 5d1bc8726a
3 changed files with 4 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ module Moderator
before_filter :post_approvers_only
def create
cookies[:moderated] = Time.now.to_i
cookies.permanent[:moderated] = Time.now.to_i
@post = ::Post.find(params[:post_id])
if @post.is_deleted? || @post.is_flagged? || @post.is_pending?
@post.approve!