HELP with redirect_to!


#1

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:

#controller
def comments
content = Content.find(params[:id])
comment = Comment.new(params[:comment])
content.comments << comment
content.save
redirect_to (
:action => ‘individual’,
:year => content.posted_at.year,
:month => content.posted_at.month,
:day => content.posted_at.day,
:permalink => content.permalink # line 61
)
end

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!