form_remote_tag

Pat wrote:

I am using form_remote_tag as follows:
<%= form_remote_tag(:update => "sku", :url=>{:action =>:generate_skus})
%>
The problem I am having is the web page will actually change to the
generate_skus page which defeats the purpose of using this. Any ideas on
why it wouldnt update the html code on the current page.

Post the code that responds to that action.

Pat wrote:

I am using form_remote_tag as follows:
<%= form_remote_tag(:update => "sku", :url=>{:action =>:generate_skus})
%>

I can't help because I just never use :update. I know it's useful...

         def generate_skus
           @output = "This is not correct"
           render :partial => "generate_skus"
         end
view for _generate_skus
<%= @output %>

I'm also aware that some people don't like to mix model and view code. But I would have written the response like this:

   render :update do |page|
       page.replace_html 'sku', @output
   end