Rails 4 - json.jbuilder with remotipart -
my application details
- rails 4.0 application
- remotipart
gem remotipart (1.2.1)
- using json.jbuilder return response.
- using paperclip gem uploading file
paperclip (~> 4.1)
i have form remote: true
, multipart: true
. redering json.jbuilder template after submitting form. have ajax:success
callback 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_for
it worked.
Comments
Post a Comment