Returning from Ajax call - "redirect_to error"

I have Ajax commenting on my site, well, I’m trying to get it working.
It worked fine locally, but when I posted to the server, I’m getting an
“Application Error (Rails)”, and I checked the logs, and it has:

(stack trace too deep)
url_for' /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:769:inredirect_to’
redirect_to' /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:769:inredirect_to’

With the second line continuing forever. Here’s my controller:

def comments
content = Content.find(params[:id])
@comment =[:comment])
content.comments << @comment
@comment_count = Comment.count(“content_id=#{params[:id]}”)

#remote form
<%= form_remote_tag(
:url => {:controller => ‘inventory’, :action => ‘comments’,
:id =>},
:update => {:success => “new-comment”},
:loading => “‘loading’);”,
:success => “Element.hide(‘loading’);”,
:complete => “clearText();”,
:position => “bottom”
) %>

 <%= text_field "comment", "name", :size => "20" %></p>

 <%= text_field "comment", "site", :size => "20" %></p>

 <%= text_area "comment", "entry", :rows => "7", :cols => "35"%></p>

 <p><input type="submit" name="submit" id="form-submit-button" 

value=“Post Remark” class=“btn” />

 <div class="cmnt-rss"><a href="/new/commentsfeed/" title="Syndicate 

Comments (RSS 2.0)">RSS 

<%= end_form_tag %>

Can someone please help with this? Why is ‘url_for’ used? What does it
do, and should I be using it?

Please help! This is running live, and I can’t fix it!

Thanks for any advice.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs