From d6f69b635865d449030120d955aec82be6442872 Mon Sep 17 00:00:00 2001 From: Ricky Barrette Date: Sun, 29 Apr 2012 00:47:59 -0400 Subject: [PATCH] Fixed the error messages associated with invalid reports closes #25 --- app/controllers/exceptionhandler_controller.rb | 3 ++- app/views/exceptionhandler/index.html.erb | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/controllers/exceptionhandler_controller.rb b/app/controllers/exceptionhandler_controller.rb index 4020787..110340f 100755 --- a/app/controllers/exceptionhandler_controller.rb +++ b/app/controllers/exceptionhandler_controller.rb @@ -59,7 +59,8 @@ class ExceptionhandlerController < ApplicationController issue.save flash.now[:notice] = "New report filed: ##{issue.id}" else - flash.now[:error] = issue.errors.full_messages + flash.now[:error] = "There was an error with filing this report" + @output = issue.errors.full_messages end #TODO generate link to issue diff --git a/app/views/exceptionhandler/index.html.erb b/app/views/exceptionhandler/index.html.erb index 9d3e10a..b8bc6f3 100755 --- a/app/views/exceptionhandler/index.html.erb +++ b/app/views/exceptionhandler/index.html.erb @@ -1,5 +1,8 @@

Exception Handler


+<%= @output %> +
+
Number of params: <%= params.size %>

@@ -13,5 +16,3 @@ Params:
<%= params.inspect %> - -<%= @output %>