Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7898007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:19:02+00:00 2026-06-03T08:19:02+00:00

At each step in my checkout process, an order is updated via a PUT

  • 0

At each step in my checkout process, an order is updated via a PUT request. However, one of the states has a form that submits to a third party which redirects back to my site, calling the update method with GET (no control over this).

Why does my respond_with code appear to be totally ignored and I get a Missing Template checkout/update error? It should be hitting #edit.

CheckoutController.rb

before_filter :load_order

def update
  if @order.update_attributes(params[:order])
    @order.next
  end
  respond_with(@order, :location => checkout_state_url(@order.state))
end

routes.rb

match '/checkout/update/:state' => 'checkout#update', :as => :update_checkout
match '/checkout/:state' => 'checkout#edit', :as => :checkout_state
match '/checkout' => 'checkout#edit', :state => 'client_details', :as => :checkout
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T08:19:04+00:00Added an answer on June 3, 2026 at 8:19 am

    It looks like respond_with does different things depending upon the HTTP verb and whether the resource has errors. See here and here.

    The following code worked for me:

    def update
        if @order.update_attributes(params[:order]) && @order.next
            respond_with(@order) { |format| format.html { redirect_to checkout_state_url(@order.state) } }
        else
            respond_with(@order) { |format| format.html { render :edit } }
        end
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The client wants the checkout process to look like discrete pages for each step
On my site I have a form that spans 2 steps each step 1
Is there a way that i can save data on each step in wizard
I'm writing a workflow system that is driven entirely at each step by explicit
I'm looking for a way to measure each step of a (HTTP) web request
I'm using a JTabbedPane to hold each step in the wizard that I am
I have a system with several steps. Each step increments one single object instance.
I'm using state_machine to build a multi-step form, with fields for each step validated
I have a three-step process that is entirely reliant upon JavaScript and Ajax to
I've got a page with multiple steps to completing a form. In each step,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.