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

@@ -7,7 +7,7 @@ class TopicsController < ApplicationController
end
def create
@topic.user = current_user
@topic.user ||= current_user
if @topic.save
flash[:notice] = "Topic was successfully created."