jquery - Rails 3.0.12 remote form failing with AJAX update -
using ruby 1.8.7-p358, rails 3.0.12, gem responder, gem simple-form; jquery_ujs.js
i have form :remote=>true , uploading file
= simple_form_for :resume, :url => {:controller => :resumes, action => :upload_resume, :id => @job_seeker.id}, :html => { :multipart => true }, :remote => true |f| etc
the resume controller method looks this:
respond_to :html, :xml, :json, :js def upload_resume r = @job_seeker.resumes.new r.name = params[:resume][:name] r.source_path = params[:resume][:content].original_filename r.doc_type = params[:resume][:content].content_type r.content = params[:resume][:content].tempfile.read r.size = r.content.size r.source_ip = request.remote_ip r.save ,end
which does, not respond upload_resume.js.erb, looks this:
$('#resume_list').html("<%= escape_javascript(render(:partial => 'resumes/resumes' ))%>");
is there data-remote & file uploads causes render misbehave?
any appreciated.
solved issue converting erb haml
Comments
Post a Comment