aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Houston <robin@lenny.robin>2011-07-28 13:50:30 +0100
committerRobin Houston <robin@lenny.robin>2011-07-28 13:50:30 +0100
commit51a74f4b275fab25ac567843ab99b885a8444789 (patch)
tree8125efe5cef2ebabaedeacf591903d6a92656032
parent512ee63b9eac634d42f2bf87cabd3fa4a0b7c554 (diff)
parentbd2472e13a03f4f30c96a5d694efdc5c76798662 (diff)
Merge branch 'master' of git@github.com:sebbacon/alaveteli
-rw-r--r--app/controllers/request_controller.rb2
-rw-r--r--config/routes.rb1
-rw-r--r--spec/controllers/request_controller_spec.rb3
3 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 472f18f6e..7b9421464 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -313,7 +313,7 @@ class RequestController < ApplicationController
replied by then.</p>
<p>If you write about this request (for example in a forum or a blog) please link to this page, and add an
annotation below telling people about your writing.</p>",:law_used_full=>@info_request.law_used_full)
- redirect_to request_url(@info_request)
+ redirect_to show_new_request_path(:url_title => @info_request.url_title)
end
# Submitted to the describing state of messages form
diff --git a/config/routes.rb b/config/routes.rb
index d9989a800..c16c10eb9 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -39,6 +39,7 @@ ActionController::Routing::Routes.draw do |map|
request.new_request_to_body '/new/:url_name', :action => 'new'
request.show_request '/request/:url_title.:format', :action => 'show'
+ request.show_new_request '/request/:url_title/new', :action => 'show'
request.details_request '/details/request/:url_title', :action => 'details'
request.similar_request '/similar/request/:url_title', :action => 'similar'
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index 9d91bf8c2..1a190cad6 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -363,6 +363,9 @@ describe RequestController, "when creating a new request" do
mail.body.should =~ /This is a silly letter. It is too short to be interesting./
response.should redirect_to(:action => 'show', :url_title => ir.url_title)
+ # This test uses an explicit path because it's relied in
+ # Google Analytics goals:
+ response.redirected_to.should == "/en/request/why_is_your_quango_called_gerald/new"
end
it "should give an error if the same request is submitted twice" do