I am trying to set an attribute on an object that I am creating. I feel like this should work:
def create
@album = Album.new(params[:album])
@album.user = current_user
if @album.save
flash[:notice] = 'Album was successfully created for ' + current_user.login + '.'
redirect_to albums_url
else
render :action => "new"
end
end
But it seems to ignore the assignment to the user
field. Any ideas?