I’ve done this a hundred times in other places in my code but it seems that this has suddenly broken. I can replicate it on my coworkers computer… 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 -%>
<% end -%>When rendering this non-ajax, it generates the URL for form_remote_tag correctly…
When Rendering this through an Ajax call in which case render :partial is called from same action, , I’m receiving:
undefined method `rewrite' for #<String:0x366c7a0>
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:522:in `url_for'
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/url_helper.rb:27:in `url_for'
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/url_helper.rb:75:in `link_to'
in url_for in base.rb, this is doing:
@url.rewrite
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
Thanks!
Stephen