Return to Snippet

Revision: 2874
at April 30, 2007 17:19 by winson


Initial Code
    # CHANGED: Don't do this.
    # if request.xhr?
    #   render :action => "add_with_ajax"
    # else
    #   redirect_to :controller => "catalog" 
    # end
    respond_to do |format|
      format.html {redirect_to :controller => "catalog"}
      format.js {render :action => "add_with_ajax"}
    end

Initial URL

                                

Initial Description

                                

Initial Title
Respond to Ajax

Initial Tags
ajax, textmate

Initial Language
Rails