aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/request_controller.rb2
-rw-r--r--config/routes.rb2
-rw-r--r--spec/controllers/request_controller_spec.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 24dbbeba0..749cf2d54 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -505,7 +505,7 @@ class RequestController < ApplicationController
end
def describe_state_requires_admin
- @info_request = InfoRequest.find(params[:id])
+ @info_request = InfoRequest.find_by_url_title!(params[:url_title])
# Check authenticated. We check is_owning_user
# to get admin overrides (see is_owning_user? above)
diff --git a/config/routes.rb b/config/routes.rb
index 093bd82d6..16f8644dd 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -55,7 +55,7 @@ ActionController::Routing::Routes.draw do |map|
request.similar_request '/similar/request/:url_title', :action => 'similar'
request.describe_state '/request/:id/describe', :action => 'describe_state', :conditions => {:method => :post}
- request.describe_state_requires_admin '/request/:id/describe/requires_admin', :action => 'describe_state_requires_admin', :conditions => { :method => :post }
+ request.describe_state_requires_admin '/request/:url_title/describe/requires_admin', :action => 'describe_state_requires_admin', :conditions => { :method => :post }
request.show_response_no_followup '/request/:id/response', :action => 'show_response'
request.show_response '/request/:id/response/:incoming_message_id', :action => 'show_response'
request.get_attachment_as_html '/request/:id/response/:incoming_message_id/attach/html/:part/*file_name', :action => 'get_attachment_as_html'
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index 6fcf43cab..25ad1df5f 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -1510,7 +1510,7 @@ describe RequestController, "when classifying an information request" do
end
it "should send an email with a message when classified as requires_admin" do
- post :describe_state_requires_admin, :message => "Something weird happened", :id => @dog_request.id
+ post :describe_state_requires_admin, :message => "Something weird happened", :url_title => @dog_request.url_title
@dog_request.reload
@dog_request.awaiting_description.should == false