idk, lots

This commit is contained in:
jomo
2014-02-01 00:56:50 +01:00
parent 86452ea00b
commit 02f9664624
30 changed files with 1467 additions and 54 deletions

View File

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