handle some common error cases

This commit is contained in:
albert
2013-03-15 15:18:43 -04:00
parent 85ab44cb80
commit 95e8f02478
4 changed files with 12 additions and 1 deletions

View File

@@ -18,6 +18,10 @@ protected
@exception = nil
@error_message = "The database timed out running your query."
render :template => "static/error", :status => 500
elsif exception.is_a?(::ActiveRecord::RecordNotFound)
@exception = nil
@error_message = "That record was not found", :status => 404
render :template => "static/error", :status => 500
else
render :template => "static/error", :status => 500
end