Forum: Ruby on Rails form_for + catch the complete action

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
97bd2f0974055dacf53a0643b013b32e?d=identicon&s=25 Petan Cert (petan)
on 2009-02-05 17:17
Hi I am using classic form_for to upload pictures using ajax.

<% form_for(:images, :url => formatted_images_path(:format => 'js'),
:html => { :multipart => true, :target => 'upload_frame' }) do |f| %>

Is there a way to catch the complete action? I would like to use
lightbox to show and crop the image in iframe.

thank you.
Petr
8d38199a01d2243e313c48456c6ddff9?d=identicon&s=25 Daly (Guest)
on 2009-02-05 17:32
(Received via mailing list)
Can you use form_remote_for?

On Feb 5, 11:17 am, Petan Cert <rails-mailing-l...@andreas-s.net>
97bd2f0974055dacf53a0643b013b32e?d=identicon&s=25 Petan Cert (petan)
on 2009-02-05 17:41
Hi,

that is the trouble, the upload is not working with remote_form_for.

Cheers,
Petr


Daly wrote:
> Can you use form_remote_for?
>
> On Feb 5, 11:17�am, Petan Cert <rails-mailing-l...@andreas-s.net>
8d38199a01d2243e313c48456c6ddff9?d=identicon&s=25 Daly (Guest)
on 2009-02-05 18:11
(Received via mailing list)
I used this about a year ago and it worked fine
http://khamsouk.souvanlasy.com/2007/5/1/ajax-file-....
Not sure if it still works with current versions of Rails.

In my latest app, I used swfupload to provide multiple file uploads
with a progress bar. There are better alternatives if you are using
apache and passenger.

On Feb 5, 11:41 am, Petan Cert <rails-mailing-l...@andreas-s.net>
Ca0d1fa83b8d8f39a51c0f25b0f17336?d=identicon&s=25 Mathieu Rousseau (Guest)
on 2009-02-05 18:38
(Received via mailing list)
I already used responds_to_parent successfully.

What are the better alternatives if we use Apache and Passenger?
8d38199a01d2243e313c48456c6ddff9?d=identicon&s=25 Daly (Guest)
on 2009-02-06 21:36
(Received via mailing list)
Sorry about the delay:

I found a nice tutorial here:
http://www.railsillustrated.com/screencast-file-up...

On Feb 5, 12:37 pm, Mathieu Rousseau <mathieu.rousseau...@gmail.com>
This topic is locked and can not be replied to.