% content_for :javascript do %> $('#new_logoA_form') .bind("ajax:complete", function(evt, data, status, xhr){ // Insert response partial into page below the form. $('#prueba').append(xhr.responseText); }); <%end%> <%= form_for :logo, @logo,:url => logos_path, :html => { :multipart => true, :id=>'new_logo_form' }, :remote => false do |f| %> <% if @logo.errors.any? %>