Stephen
2007-Apr-18 21:39 UTC
url_for, form_remote_tag when rendered from an ajax reference...
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 -%> <input type="text" name="balance_date" id="balance_date" style="display: none;"> <% 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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---