From 6af005cf94efb77645b422f9f71a4f3039918cf9 Mon Sep 17 00:00:00 2001 From: Coleman Date: Fri, 17 Oct 2008 01:27:23 -0500 Subject: [PATCH] directly set the user id attribute --- app/controllers/photos.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/photos.rb b/app/controllers/photos.rb index d600174..586765f 100644 --- a/app/controllers/photos.rb +++ b/app/controllers/photos.rb @@ -25,7 +25,7 @@ class Photos < Application end def create - @photo.user = current_user + @photo.user_id = current_user.id if @photo.save flash[:notice] = 'Great success' redirect url(:photo, @photo)