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)