more forum stuff

This commit is contained in:
jomo
2013-10-16 00:51:50 +02:00
parent 7c578874c9
commit b6115970dd
25 changed files with 208 additions and 55 deletions

View File

@@ -29,7 +29,7 @@ class BlogpostsController < ApplicationController
def create
if mod?
@post = Blogpost.new(params[:blogpost])
@post = Blogpost.new(params[:blogpost] ? params[:blogpost].slice(:title, :content) : {})
@post.user_author = current_user
if @post.save
redirect_to @post, notice: 'Post has been created.'