Forum: Ruby on Rails HELP with redirect_to!

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
ry a. (Guest)
on 2006-03-04 20:05
I'm having trouble redirecting back to the same page after a comment is
posted.  To post a comment, this is what I'm doing:

def comments
    content = Content.find(params[:id])
    comment =[:comment])
    content.comments << comment
    redirect_to (
      :action => 'individual',
      :year => content.posted_at.year,
      :month => content.posted_at.month,
      :day =>,
      :permalink => content.permalink   # line 61

I'm getting a syntax error on line 61.  How can I redirect back to the
same page?

I've tried "redirect_to action => :back" and "redirect_to
request.request_uri" but neither one of them work.

Please help!
This topic is locked and can not be replied to.