cleaned up, added threadreplies, added info

This commit is contained in:
jomo
2014-04-20 03:07:39 +02:00
parent 097f9b1ba4
commit cbafa3c46a
24 changed files with 354 additions and 132 deletions

View File

@@ -29,7 +29,9 @@ class CommentsController < ApplicationController
def update
@comment = Comment.find(params[:id])
if mod? || @comment.author.is?(current_user)
if @comment.update_attributes(comment_params)
@comment.user_editor = current_user
@comment.attributes = comment_params
if @comment.save
flash[:notice] = "Comment updated!"
redirect_to blogpost_path(@comment.blogpost) + "#comment-#{@comment.id}"
else