# Tutorial and Rails 2.0

**URL:** <https://www.ruby-forum.com/t/tutorial-and-rails-2-0/134970>\
**Category:** Rails\
**Created:** [April 16, 2008, 6:16pm UTC](https://www.ruby-forum.com/t/tutorial-and-rails-2-0/134970 "2008-04-16T18:16:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kellygreer1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/77aa72/32.png) [@kellygreer1](https://www.ruby-forum.com/u/kellygreer1)\
**Post date:** [April 16, 2008, 6:16pm UTC](https://www.ruby-forum.com/t/tutorial-and-rails-2-0/134970/1 "2008-04-16T18:16:04Z")

</div>

Can someone help me over this last roadblock…

I’m working through the tutorial above in Rails 2.0  
[http://www.netbeans.org/kb/60/ruby/model.html](http://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  
removed\_email\_address@domain.invalid  
change nospam to yahoo

---

<div class="post-metadata">

**Author:** ![kellygreer1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/77aa72/32.png) [@kellygreer1](https://www.ruby-forum.com/u/kellygreer1)\
**Post date:** [April 16, 2008, 6:58pm UTC](https://www.ruby-forum.com/t/tutorial-and-rails-2-0/134970/2 "2008-04-16T18:58:56Z")

</div>

What are the errors? Are you getting all of the values you expect  
(nothing is nil?)

-c
