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

@@ -12,7 +12,8 @@ class ForumthreadsController < ApplicationController
def update
if mod? || @thread.author.is?(current_user)
@thread.user_editor = current_user
if @thread.update_attributes thread_params([:user_editor])
@thread.attributes = thread_params([:user_editor])
if @thread.save
redirect_to @thread, notice: 'Post has been updated.'
else
flash[:alert] = "There was a problem while updating the post"