views:

144

answers:

2

Is there a defacto way of doing an Ajaxy file upload in Rails? (I say "Ajaxy" because it can't really use XHR). I've read about various approaches and plugins. Wondering what's the cleanest/most approved of by the community.

Thanks!

A: 

I've used responds_to_parent with success on several projects.

The idea is that you're doing a full POST to an iframe embedded on the page. The responds_to_parent plugin adds some helpful functionality to then execute success or failure javascript in the context of the main page.

Ian Terrell