added redirect to getting_started_path in requests#create
This commit is contained in:
parent
cd726c0ba7
commit
b906dd5a1d
1 changed files with 17 additions and 4 deletions
|
|
@ -46,7 +46,7 @@ class RequestsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
if params[:getting_started]
|
if params[:getting_started]
|
||||||
redirect_to getting_started_path(params[:getting_started])
|
redirect_to getting_started_path(:step=>params[:getting_started])
|
||||||
else
|
else
|
||||||
respond_with :location => aspect
|
respond_with :location => aspect
|
||||||
end
|
end
|
||||||
|
|
@ -66,16 +66,29 @@ class RequestsController < ApplicationController
|
||||||
else
|
else
|
||||||
raise e
|
raise e
|
||||||
end
|
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
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if @request
|
if @request
|
||||||
flash[:notice] = I18n.t 'requests.create.success',:destination_url => @request.destination_url
|
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
|
else
|
||||||
flash[:error] = I18n.t 'requests.create.horribly_wrong'
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue