Questions tagged [remotipart]

The Remotipart gem enables AJAX file-upload capability to remote forms in Rails 3 apps by extending the native jquery-ujs functionality.

The Remotipart gem enables AJAX file-upload capability to remote forms in Rails 3 apps by extending the native jquery-ujs functionality.

The Remotipart gem does two things:

  1. When non-blank file input fields are detected in a form, remotipart.js hijacks the remote form submission, and instead submits the form using via form.js’s .ajaxSubmit() function, which uses iFrame technique described in the last article.
  2. Remotipart provides the remotipart_response block method in our response js.erb views. This method first checks to see if the form was hijacked by Remotipart and was thus submitted in an iFrame, and if so, it returns our generated JS inside a textarea element, so that it automatically gets executed in our parent window.
37 questions
0
votes
1 answer

carrierwave AJAX upload with remotipart

In my rails4 I would like to submit a form via AJAX that has a file uploaded via carrierwave. As far as I know it can be done via remotipart, but can't figure it out how I can do that. (Remotipart installed properly since it's working with refile…
Sean Magyar
  • 2,360
  • 1
  • 25
  • 57
0
votes
0 answers

Error in nested_form when rendering page after submiting form with remotipart

The Application: In my Rails (v3.2.17) project I have classes: class User < ActiveRecord::Base has_many :photos, dependent: :destroy accepts_nested_attributes_for :photos, :allow_destroy => true attr_accessible photos_attributes and: class…
evedovelli
  • 2,115
  • 28
  • 28
0
votes
0 answers

Async file uploads with Rails 4

I have a form that uses rails jquery-UJS to submit asynchronously. It works fine as long as there is not a file input. When I add a file input, the form stops submitting asynchronously, and instead submits normally (full page reload). I found out…
Don P
  • 60,113
  • 114
  • 300
  • 432
0
votes
1 answer

Rails 4 - json.jbuilder with remotipart

My Application details Rails 4.0 application Remotipart gem remotipart (1.2.1) Using json.jbuilder to return a response. Using paperclip gem for uploading file paperclip (~> 4.1) I have a form with remote: true and multipart: true. I am redering a…
0
votes
1 answer

Do I need to reload the comment object or the partial that contains the comment in case of using Ajax in Rails 3?

I have been trying to figure out adding comments without reloading the page using Ajax, after reading few different tutorials this is what I came up to so far, and it's not working: inside user_comments/_comments.html.erb
0bserver07
  • 3,390
  • 1
  • 28
  • 56
0
votes
1 answer

Rails Jquery upload file using remotipart gem NoMethodError: undefined method `name'

I am using gem remotipart for uploading file. Here is my view: <%= form_for @file_upload, :id => "form_feedback_attachment", :url => { :controller => "widgets", :action => "feedback_attachment_upload" }, :html => {:multipart => true} do |f| %> …
ishwr
  • 725
  • 3
  • 14
  • 36
0
votes
1 answer

AJAX image upload with Rails, Backbone, Remotipart

I've been using Remotipart successfully to upload images via AJAX for a while now, but we've recently decided to go the Backbone route, and now since my forms are rendered via JS templates, I'm no longer able to use the :remote => true syntax to…
Stephen Corwin
  • 968
  • 1
  • 8
  • 21
1 2
3