features, bug fixes

This commit is contained in:
jomo
2014-02-03 01:47:49 +01:00
parent 0d06bc19fc
commit 0604bbce63
18 changed files with 156 additions and 71 deletions

View File

@@ -45,7 +45,7 @@ class BlogpostsController < ApplicationController
def update
@post = Blogpost.find(params[:id])
if mod?
if mod? || @comment.author.is?(current_user)
@post.user_editor = current_user
if @post.update_attributes(params[:blogpost] ? params[:blogpost].slice(:title, :content, :user_editor) : {})
redirect_to @post, notice: 'Post has been updated.'