aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/user_controller.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-01-24 11:54:05 +0000
committerSeb Bacon <seb.bacon@gmail.com>2012-01-24 11:54:05 +0000
commite59207a79b6536ec44c580d3e31943a2e95e09fc (patch)
tree30e6d9f0092f36088a28d909285b36b5f545e8fa /app/controllers/user_controller.rb
parent5ccba9966f685ab61efa97350177c745f36bf13b (diff)
Return a 404 for missing user profile pictures. Fixes #363
Diffstat (limited to 'app/controllers/user_controller.rb')
-rw-r--r--app/controllers/user_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb
index 45b71a3a9..f49fc9165 100644
--- a/app/controllers/user_controller.rb
+++ b/app/controllers/user_controller.rb
@@ -489,7 +489,8 @@ class UserController < ApplicationController
raise ActiveRecord::RecordNotFound.new("user not found, url_name=" + params[:url_name])
end
if !@display_user.profile_photo
- raise "user has no profile photo, url_name=" + params[:url_name]
+ raise ActiveRecord::RecordNotFound.new("user has no profile photo, url_name=" + params[:url_name])
+
end
response.content_type = "image/png"