0
내 결제 과정의 각 단계에서 PUT
요청을 통해 주문이 업데이트됩니다. 그러나 상태 중 하나는 GET
(제어 할 수 없음)으로 업데이트 방법을 호출하여 내 사이트로 리디렉션되는 제 3 자에게 제출하는 양식이 있습니다.GET 요청시 respond_with 위치가 무시됩니다.
내 respond_with
코드가 완전히 무시 된 것으로 보이는 데 제가 Missing Template checkout/update
오류가 발생하는 이유는 무엇입니까? 그것은 #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