Rails 4 - json.jbuilder with remotipart -


my application details

  1. rails 4.0 application
  2. remotipart gem remotipart (1.2.1)
  3. using json.jbuilder return response.
  4. using paperclip gem uploading file paperclip (~> 4.1)

i have form remote: true , multipart: true. redering json.jbuilder template after submitting form. have ajax:successcallback on form.

when submit form without attachment renders json.jbuilder template , ajax:success callback works. if submit form attachment form gets submitted rendering json.jbuilder file. ajax:success callback doesn't work.

i have been struggling issue since 2 days.

thanks in advance

i trying use

hidden_field "format", :json 

but didn't work. after adding option

:'data-type' => :json  

for form_forit worked.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -