Forum: Ruby on Rails url_for, form_remote_tag when rendered from an ajax referenc

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.
Stephen (Guest)
on 2007-04-19 01:40
(Received via mailing list)
I've done this a hundred times in other places in my code but it seems
this has suddenly broken.  I can replicate it on my coworkers
I'm generating a form_remote_tag from within a partial as so:

<% form_remote_tag(:update => 'acct_balance',
                   :url => '/report/ajax_get_balance',
                   :html => {:name => 'update_balance', :id =>
'update_balance'}) do -%>
<input type="text" name="balance_date" id="balance_date" style="display:
<% end -%>

When rendering this non-ajax, it generates the URL for form_remote_tag

When Rendering this through an Ajax call in which case render :partial
called from same action, , I'm receiving:

undefined method `rewrite' for #<String:0x366c7a0>

in url_for in base.rb, this is doing:


however in this case @url.rewrite is a string when it is nromally a
UrlRewrite object so @url.rewrite fails..

Anyone have this problem? Running

lemming:/Users/sblackstone/development/rwjf root# rails -v
Rails 1.2.3


This topic is locked and can not be replied to.