Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible in Rails3, to have a multipart form => true & use remote => true

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?

like image 303
TheExit Avatar asked Oct 24 '10 16:10

TheExit


1 Answers

You can use Remotipart gem for file uploads with remote => true.

like image 146
Musaffa Avatar answered Oct 14 '22 08:10

Musaffa