Using Ruby 1.8.7-p358, Rails 3.0.12, gem responder, gem simple-form; jquery_ujs.js
I have a form where :remote=>true and also uploading a file
= simple_form_for :resume, :url => {:controller => :resumes,
action => :upload_resume, :id => @job_seeker.id}, :html => { :multipart => true }, :remote => true do |f|
etc
The Resume controller method looks like 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 it does, but will not respond to upload_resume.js.erb, which looks like this:
$('#resume_list').html("<%= escape_javascript(render(:partial => 'resumes/resumes' ))%>");
Is there anything about data-remote & file uploads that causes the render to misbehave?
Any help would be appreciated.
solved the issue by converting erb to haml