directly set the user id attribute

master
Coleman 2008-10-17 01:27:23 -05:00
parent 9bb9e73e6e
commit 6af005cf94
1 changed files with 1 additions and 1 deletions

View File

@ -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)