From 998ab50974403ddc1cd166a3fe97528d344b1db4 Mon Sep 17 00:00:00 2001
From: David Heinemeier Hansson
Date: Thu, 31 Mar 2005 14:46:11 +0000
Subject: Improved the message display on the exception handler pages #963
[Johan Sorensen]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1048 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
---
actionpack/CHANGELOG | 2 ++
.../lib/action_controller/templates/rescues/diagnostics.rhtml | 2 +-
.../lib/action_controller/templates/rescues/routing_error.rhtml | 6 ++++--
.../lib/action_controller/templates/rescues/template_error.rhtml | 7 ++++---
actionpack/lib/action_view/helpers/pagination_helper.rb | 2 +-
5 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index bc7686a5b6..363076d0f6 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Improved the message display on the exception handler pages #963 [Johan Sorensen]
+
* Fixed that on very rare occasions, webrick would raise a NoMethodError: private method 'split' called for nil #1001 [Flurin Egger]
* Added a wide range of new Javascript effects:
diff --git a/actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml b/actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml
index 9fb2de5b10..80634b2d34 100644
--- a/actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml
+++ b/actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml
@@ -8,7 +8,7 @@
<%=h @exception.class.to_s %> in
<%=h (@request.parameters["controller"] || "").capitalize %>#<%=h @request.parameters["action"] || "" %>
-<%=h Object.const_defined?(:RAILS_ROOT) ? @exception.message.gsub(RAILS_ROOT, "") : @exception.message %>
+<%=h Object.const_defined?(:RAILS_ROOT) ? @exception.message.gsub(RAILS_ROOT, "") : @exception.message %>
<% unless app_trace.empty? %><%=h app_trace.join("\n") %>
<% end %>
diff --git a/actionpack/lib/action_controller/templates/rescues/routing_error.rhtml b/actionpack/lib/action_controller/templates/rescues/routing_error.rhtml
index 82c01e10c9..bf7dcb232a 100644
--- a/actionpack/lib/action_controller/templates/rescues/routing_error.rhtml
+++ b/actionpack/lib/action_controller/templates/rescues/routing_error.rhtml
@@ -1,8 +1,10 @@
Routing Error
-<%=h @exception.message %>
+<%=h @exception.message %>
<% unless @exception.failures.empty? %>
Failure reasons:
+
<% @exception.failures.each do |route, reason| %>
- <%=h route.inspect.gsub('\\', '') %> failed because <%=h reason.downcase %>
+ <%=h route.inspect.gsub('\\', '') %>
failed because <%=h reason.downcase %>
<% end %>
+
<% end %>
diff --git a/actionpack/lib/action_controller/templates/rescues/template_error.rhtml b/actionpack/lib/action_controller/templates/rescues/template_error.rhtml
index 405a2e070a..9a331b9bf2 100644
--- a/actionpack/lib/action_controller/templates/rescues/template_error.rhtml
+++ b/actionpack/lib/action_controller/templates/rescues/template_error.rhtml
@@ -4,11 +4,12 @@
- Showing <%=h @exception.file_name %> where line #<%=h @exception.line_number %> raised
- <%=h @exception.message %>
+ Showing <%=h @exception.file_name %> where line #<%=h @exception.line_number %> raised:
+
<%=h @exception.message %>
-<%=h @exception.source_extract %>
+Extracted source (around line #<%=h @exception.line_number %>):
+
<%=h @exception.source_extract %>
<%=h @exception.sub_template_message %>
diff --git a/actionpack/lib/action_view/helpers/pagination_helper.rb b/actionpack/lib/action_view/helpers/pagination_helper.rb
index 1e8c80a032..dc80cdb2e7 100644
--- a/actionpack/lib/action_view/helpers/pagination_helper.rb
+++ b/actionpack/lib/action_view/helpers/pagination_helper.rb
@@ -6,7 +6,7 @@ module ActionView
#
# <%= link_to "Previous page", { :page => paginator.current.previous } if paginator.current.previous %>
#
- # <%= link_to "Next page", { :page => paginator.current.next } of paginator.current.next =%>
+ # <%= link_to "Next page", { :page => paginator.current.next } if paginator.current.next =%>
module PaginationHelper
unless const_defined?(:DEFAULT_OPTIONS)
DEFAULT_OPTIONS = {
--
cgit v1.2.3