i’m trying to add comments to a blog.
I got it working, but i want to store the user too, so I added the
user_id to the blogcomments table…
Since then, the page renders - but the comment is no longer stored.
(the database stores the user id, but not the body, blogpost id)
@blogcomment = Blogcomment.find(:all, :order => “created_at
@user = User.find(session[:user_id])
@blogcomment = Blogcomment.create(:id =>
params[:body], :user_id => session[:user_id])
flash[:notice] = “Added your comment”
redirect_to :action => “show”, :id => params[:id]
Can you see why the values are being set to NULL/ I’ve spent all
evening trying different things, but no joy yet…