From 5a6f4c5690d3f7292e6c96ea7170c741306665e3 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 23 Feb 2008 15:35:49 +0000 Subject: [PATCH] Use named constants for HTTP response codes. --- app/controllers/user_preference_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/user_preference_controller.rb b/app/controllers/user_preference_controller.rb index 7f841b72b..b22c52240 100644 --- a/app/controllers/user_preference_controller.rb +++ b/app/controllers/user_preference_controller.rb @@ -32,7 +32,7 @@ class UserPreferenceController < ApplicationController pref = UserPreference.new unless keyhash[pt['k']].nil? # already have that key - render :text => 'OH NOES! CAN HAS UNIQUE KEYS?', :status => 406 + render :text => 'OH NOES! CAN HAS UNIQUE KEYS?', :status => :not_acceptable return end @@ -45,7 +45,7 @@ class UserPreferenceController < ApplicationController end if prefs.size > 150 - render :text => 'Too many preferences', :status => 413 + render :text => 'Too many preferences', :status => :request_entity_too_large return end @@ -58,7 +58,7 @@ class UserPreferenceController < ApplicationController end rescue Exception => ex - render :text => 'OH NOES! FAIL!: ' + ex.to_s, :status => 500 + render :text => 'OH NOES! FAIL!: ' + ex.to_s, :status => :internal_server_error return end -- 2.43.2