[Rails] Re: null values...

2010-07-12 Thread RubyonRails_newbie
Awesome, thanks for the advice!!! On 12 July, 19:02, Bob Proulx wrote: > RubyonRails_newbie wrote: > > <%= form_tag :action => "comment", :id => @blogpost %> > >    <%= text_area "comment", "body", :cols => 40, :rows => 6 %> > >    <%= submit_tag "Comment" %> > > I tried - @blogcomment = @user.b

[Rails] Re: null values...

2010-07-12 Thread Bob Proulx
RubyonRails_newbie wrote: > <%= form_tag :action => "comment", :id => @blogpost %> ><%= text_area "comment", "body", :cols => 40, :rows => 6 %> ><%= submit_tag "Comment" %> > I tried - @blogcomment = @user.blogcomments.create(:id => > params[:body]) but this still remains a null value... W

[Rails] Re: null values...

2010-07-12 Thread RubyonRails_newbie
Hello, Yeah below is the code from the form that creates the comment: <%= form_tag :action => "comment", :id => @blogpost %> <%= text_area "comment", "body", :cols => 40, :rows => 6 %> <%= submit_tag "Comment" %> I tried - @blogcomment = @user.blogcomments.create(:id => params[:body]) but

Re: [Rails] Re: null values...

2010-07-11 Thread David A. Black
On Sun, 11 Jul 2010, RubyonRails_newbie wrote: On 11 July, 21:23, "David A. Black" wrote: On Sun, 11 Jul 2010, RubyonRails_newbie wrote: 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 th

[Rails] Re: null values...

2010-07-11 Thread RubyonRails_newbie
I tried both :body and :id but the same issue: @blogcomment = Blogcomment.create(:id => params[:body], :user_id => session[:user_id]) On 11 July, 21:23, "David A. Black" wrote: > On Sun, 11 Jul 2010, RubyonRails_newbie wrote: > > i'm trying to add comments to a blog. > > > I got it working, but