From b906dd5a1d62ba2d39a31886d6989ff0b85b53d0 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Wed, 27 Oct 2010 12:31:48 -0700 Subject: [PATCH] added redirect to getting_started_path in requests#create --- app/controllers/requests_controller.rb | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/app/controllers/requests_controller.rb b/app/controllers/requests_controller.rb index 0f07640fb..ffc845c93 100644 --- a/app/controllers/requests_controller.rb +++ b/app/controllers/requests_controller.rb @@ -46,7 +46,7 @@ class RequestsController < ApplicationController end if params[:getting_started] - redirect_to getting_started_path(params[:getting_started]) + redirect_to getting_started_path(:step=>params[:getting_started]) else respond_with :location => aspect end @@ -66,16 +66,29 @@ class RequestsController < ApplicationController else raise e end - respond_with :location => aspect + + if params[:getting_started] + redirect_to getting_started_path(:step=>params[:getting_started]) + else + respond_with :location => aspect + end return end if @request flash[:notice] = I18n.t 'requests.create.success',:destination_url => @request.destination_url - respond_with :location => aspect + if params[:getting_started] + redirect_to getting_started_path(:step=>params[:getting_started]) + else + respond_with :location => aspect + end else flash[:error] = I18n.t 'requests.create.horribly_wrong' - respond_with :location => aspect + if params[:getting_started] + redirect_to getting_started_path(:step=>params[:getting_started]) + else + respond_with :location => aspect + end end end