The problem was that, when using the ApplicationController::report_error
method on a failure, the message was assigned to flash[:error]. But on
the default layout flash[:error] is never displayed.
So the change was to check and, if not going to the error page, the
message is now assigned to flash[:message].
Signed-off-by: Darryl L. Pierce <mcpierce(a)gmail.com>
---
app/controllers/application_controller.rb | 6 +++++-
app/views/layouts/default.html.erb | 2 +-
doc/ChangeLog | 1 +
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/app/controllers/application_controller.rb
b/app/controllers/application_controller.rb
index dd60773..b11ae08 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -76,7 +76,11 @@ class ApplicationController < ActionController::Base
# Redirects the user to the error page and displays
# the provided message.
def report_error(message, url=nil)
- flash[:error] = message
+ if url
+ flash[:message] = message
+ else
+ flash[:error] = message
+ end
respond_to do |format|
format.html { redirect_to url ? url : error_path }
diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb
index ac8b12a..9b5a4b3 100644
--- a/app/views/layouts/default.html.erb
+++ b/app/views/layouts/default.html.erb
@@ -64,7 +64,7 @@
<% if flash[:message] %>
- <%# if javascript iss disabled, show a standard message box %>
+ <%# if javascript is disabled, show a standard message box %>
<noscript>
<div id="message-box-nojs">
<div id="message-box-text">
diff --git a/doc/ChangeLog b/doc/ChangeLog
index ee43aa4..5b69c79 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -56,6 +56,7 @@ Change Log (0.3.0):
* #226 - The sprint status text is not shown on the sprint list page. (BUG)
* #228 - Fixed the URL in the product creation RSS entry. (BUG)
* #229 - Fixed when nil.name showed up when viewing sprints. (BUG)
+ * #230 - Sprint not started but no error message is shown. (BUG)
Change Log (0.2.0):
* #97 - Users can request new projects.
--
1.6.2.5
Show replies by date