What are the errors? Are you getting all of the values you expect
(nothing is nil?)
-c
On Apr 16, 9:15 am, kellygreer1
<kellygre...-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
wrote:> Can someone help me over this last roadblock...
>
> I''m working through the tutorial above in Rails
2.0http://www.netbeans.org/kb/60/ruby/model.html
>
> And when I make it to step: "Code Sample 5: post_comment action"
> I can not get this to run under Rails 2.0. Errors.
> Seems to blow up on the ''Comment.new'' line
> What is outdated or wrong about the syntax below?
>
> def post_comment
> @comment = Comment.new(
> "post_id" => flash[:post_id],
> "created_at" => Time.now,
> "comment" =>
params[:comment][''comment'']
> )
> if @comment.save
> flash[:notice] = ''Comment was successfully
added.''
> redirect_to :action => ''show'', :id =>
flash[:post_id]
> end
> end
>
> Thanks,
> Kelly Greer
> kellygre...-GMWn+aNOponQT0dZR+AlfA@public.gmane.org
> change nospam to yahoo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---