added seed data

This commit is contained in:
Mike Kelley
2011-08-27 13:16:04 -06:00
parent 5a77a3a681
commit 18a0ccea16
4 changed files with 6 additions and 3 deletions

View File

@@ -12,7 +12,7 @@ class PostsController < ApplicationController
end
def create
@post.user = current_user
@post.user ||= current_user
if @post.save
flash[:notice] = "Post was successfully created."
redirect_to topic_path(@post.topic)