diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-02-10 15:10:55 +0000 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-03-13 13:55:45 +0000 |
commit | e58220bfdbdfc0f5e704fc4852fbfb40db0b19cb (patch) | |
tree | ac1e5ec9e16ea96d146db998ed132ab8feed2316 /app/controllers/request_controller.rb | |
parent | 308707f1512fc43c570023ee786463d37e43f1fb (diff) |
Make /similar/request/NONESUCH a 404 not 500 error
Fixes #421.
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r-- | app/controllers/request_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 313a57d7d..378c74c30 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -137,6 +137,8 @@ class RequestController < ApplicationController @per_page = 25 @page = (params[:page] || "1").to_i @info_request = InfoRequest.find_by_url_title(params[:url_title]) + raise ActiveRecord::RecordNotFound.new("Request not found") if @info_request.nil? + if !@info_request.user_can_view?(authenticated_user) render :template => 'request/hidden', :status => 410 # gone return @@ -146,7 +148,7 @@ class RequestController < ApplicationController if (@page > 1) @page_desc = " (page " + @page.to_s + ")" - else + else @page_desc = "" end end |