views:

28

answers:

1

I'm using the following form tag for @jobs which have job_photos included.

<% form_for @jobs, :html => { :multipart => true }, :remote => true do |f| %>

The form works fine non-remote, but if I add the remote = > true, the form submits, returns create.js but doesn't save anything to the DB or error?

A: 

The thing is that you cannot post a multipart form via AJAX. This is not a rails' limitation. In order to circumvent this, you need to use an iframe technique (which can be easier with responds_to_parent plugin) or use a technology like Flash or Silverlight.

neutrino