My favorites | Sign in
Project Logo
                
Details: Show all Hide all

Earlier this year

  • Jul 02, 2009
    issue 6 (Patch: respond to ajax and respond_to_parent requests) reported by stefan_a...@web.de   -   This Patch adds a method to differ between real ajax and faked respond_to_parent request. It also removes the need to give a block to responds_to_parent. Example of usage shows render_optional_error_file, which is now able to respond to 3 types of requests (html, js and respond_to_parent) in the right way: module ActionController::Rescue def render_optional_error_file(status_code) status = interpret_status(status_code)[0,3] respond_to do |format| format.html do redirect_to :controller => :error_pages, :action => status end format.js do render :update do |page| page.redirect_to :controller => :error_pages, :action => status end respond_to_parent if should_respond_to_parent?(request) end format.all do render :nothing => true, :status => status end end end end
    This Patch adds a method to differ between real ajax and faked respond_to_parent request. It also removes the need to give a block to responds_to_parent. Example of usage shows render_optional_error_file, which is now able to respond to 3 types of requests (html, js and respond_to_parent) in the right way: module ActionController::Rescue def render_optional_error_file(status_code) status = interpret_status(status_code)[0,3] respond_to do |format| format.html do redirect_to :controller => :error_pages, :action => status end format.js do render :update do |page| page.redirect_to :controller => :error_pages, :action => status end respond_to_parent if should_respond_to_parent?(request) end format.all do render :nothing => true, :status => status end end end end
  • Mar 15, 2009
    issue 5 (ActionController::UnknownAction with responds_to_parent) reported by wneimeijer   -   What steps will reproduce the problem? 1. Every time I click the form submit button 2. 3. What is the expected output? What do you see instead? I am getting errors in the rails log, telling me of an unknown action. My controller is receiving the file ok, but after the responds_to_parent the rails router wants to execute a 'show' action. What version of the product are you using? On what operating system? The latest version (actually could not find any version number in the source). OS is Windows XP, InstantRails, rails 2.2.2 and ruby 1.8.6 Please provide any additional information below.
    What steps will reproduce the problem? 1. Every time I click the form submit button 2. 3. What is the expected output? What do you see instead? I am getting errors in the rails log, telling me of an unknown action. My controller is receiving the file ok, but after the responds_to_parent the rails router wants to execute a 'show' action. What version of the product are you using? On what operating system? The latest version (actually could not find any version number in the source). OS is Windows XP, InstantRails, rails 2.2.2 and ruby 1.8.6 Please provide any additional information below.

Older

 
Hosted by Google Code