Links
Responds to Parent
Categories
Responds to Parent
Adds responds_to_parent to your controller to respond to the parent document of your page. Make Ajaxy file uploads by posting the form to a hidden iframe, and respond with RJS to the parent window.
Example
Controller:
class Test < ActionController::Base
def main
end
def form_action
# Do stuff with params[:uploaded_file]
responds_to_parent do
render :update do |page|
page << "alert($('stuff').innerHTML)"
end
end
end
end
Vitals
| Home | http://sean.treadway.info/responds-to-parent/ |
|---|---|
| Repository | http://responds-to-parent.googlecode.com/svn/trunk |
| License | Rails' (MIT) |
| Tags |
|
| Rating | (21 votes) |
| Owner | Sean Treadway |
| Created | 29 May 2006 |
Comments
-
Wonderful resource, the only problem is that http://sean.treadway.info/svn/plugins/responds_to_parent/ seems to be down... :(
Any alternative location for this pluging?
-
http://sean.treadway.info/2007/11/12/responds-to-parent-resurrected/
-
This works like a charm even with Rails 2.3.2.1
-
Yep, Glenn. Worked for me too, on version 2.3.2. Thanks very much!

